调用文件输入的单击,但不会显示文件路径

时间:2013-04-13 06:06:51

标签: php jquery

我想调用文件输入的单击。但我的问题是文件名不会出现在文本框中。这是我的代码示例。

$form_item = sprintf('
<!-- Button to invoke the click of the File Input --> 
<div style="position:relative;">
    <input type="text" id="file" style="position:absolute;" placeholder="Click here to select a file" />
    <input type="file" name="vfb-%1$d" id="%2$s" class="vfb-text %4$s %5$s %6$s %7$s %8$s" style="opacity:0; z-index:1;" onchange="document.getElementById('file').value = this.value;" />
</div>
',

0 个答案:

没有答案