問題描述
<塊引用>注意:
答案&下面的評論反映了 2009 年舊瀏覽器的狀態.現在,您實際上可以在 2017 年使用 JavaScript 動態/編程地設置文件輸入元素的值.
有關詳細信息以及演示,請參閱此問題中的答案:
如何以編程方式設置文件輸入值(即:拖放文件時)?
我想更新一個表.因此,當用戶想要更新它時,插入表單會出現在默認值出現在輸入框中的位置.但我無法加載 <input type=file....>
.
代碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><form id="form1" action="details1.php?ar=<?php echo $a;?>&api=<?php echo $ai;?>"method="post" enctype="multipart/form-data"><html xmlns="http://www.w3.org/1999/xhtml"><頭><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>歡迎使用 Prime Properties</title><link rel="stylesheet" href="style.css" type="text/css"/>頭部><身體><div class="容器"><div class="heading"><div class="banner"><img src="../images/top.jpg" width="995" height="169"/></div><!--菜單開始--><div><?php include('include/menu.php');?>