您的位置:首页 > 其它

file控件只有一个可以的写数据地方,但可读,其它控件一般是可读也可写

2012-03-21 11:22 225 查看
<script>

function canRead()

{

alert(document.getElementById("upload").value);

}

function canWrite()

{

document.getElementById("upload").value="c://1.jpg";

alert(document.getElementById("upload").value);

}

</script>

<form id="form1" name="form1" enctype="multipart/form-data" method="post" action="">

<input type="file" name="upload" id="upload"/>

<br>

<input type="button" value="可写" onclick="canRead()">

<input type="button" value="可读" onclick="canWrite()">

</form>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐