如何使用Java脚本打印文件夹内的所有txt文件
我需要使用javascript从HTML内的目录中打印所有txt文件。我试图修改处理照片的代码,但未成功
如何使用Jquery / Javascript将文件夹中的所有图像加载到网页中
var dir = "D:\Finaltests\test1\new\places";var fileextension = ".txt";$.ajax({
//This will retrieve the contents of the folder if the folder is configured as 'browsable'
url: dir,
success: function (data) {
//List all .txt file names in the page
$(data).find("a:contains(" + fileextension + ")").each(function () {
var filename = this.href.replace(window.location.host, "").replace("http://", "");
$("body").append("<input type='file' onload='readText(" + dir + ")>");
});
}});
有只小跳蛙
慕田峪4524236
慕丝7291255
随时随地看视频慕课网APP
相关分类