-3
我使用基于jQuery的文件,列出显示文件目录
代码:
<script type="text/javascript">
$(document).ready(function() {
$('#fileTreeDemo_2').fileTree({
root: '../../',
script: 'connectors/jqueryFileTree.php',
folderEvent: 'click',
expandSpeed: 750,
collapseSpeed: 750,
multiFolder: false
},
function(file){
alert(file);
});
});
</script>
<div id="fileTreeDemo_2"></div>
结果: 它显示文件列表,当我选择文件时,它触发function(file)
并给出警报alert(file);
现在的问题,如果我想补充什么场,其中所选择的文件目录,而不是让我提醒alert(file);
它表现出来的是input
场内部,如图此图像中
,所以我只是想修改function(file){ alert(file); });
显示的这个alert
内input
内容有id="dir"
与代码
<input type="text" name="something" id="dir">
〜感谢
whats'.fileTree'? – 2015-02-11 21:14:41