访问两个标签之间的文本

时间:2017-08-01 16:35:53

标签: jquery html

我的标签编码如下:

<strong>Email: </strong> testing<br />

如何访问testing

我试过了:

到目前为止

$("strong").closest("br").text()

1 个答案:

答案 0 :(得分:0)

您可以这样使用:

演示: https://jsbin.com/vezepul/edit?html,output

public static void retrieveLogFilesFTP() {
        try {

            FTPClient client = new FTPClient();

        for (int i = 0; i < components.length; i++) {

            client.connect(ENV_PROD);
            client.login([loginUserName], [loginPassword]);
            client.enterLocalPassiveMode();
            client.setFileType(FTP.BINARY_FILE_TYPE);
            client.changeWorkingDirectory("/site/wwwroot");


                FTPFile[] ftpFiles = client.listFiles();

                if (ftpFiles != null && ftpFiles.length > 0) {


                    for (FTPFile file : ftpFiles) {
                        if (file.getName().startsWith("httpplatform")) {


                            File currentDirectory = new File(PATH + components[i]);
                            if (!currentDirectory.exists()) {
                                currentDirectory.mkdir();
                            }

                            OutputStream output = new FileOutputStream(currentDirectory + "/" + file.getName(), false);
                            client.retrieveFile(file.getName(), output);


                            System.out.println(client.getReplyString());

                            output.close()


                        }

                    }

                }


            client.logout();
            client.disconnect();
            changeLogFilesNames(new File(PATH + "/" + components[i] + "/"), components[i]);


        }


    } catch (Exception ex) {
        ex.printStackTrace();
    }


}