日期:2014-05-16 浏览次数:20367 次
{'err':'','msg':{'url':'!upload\/day_110131\/20110131164055468.jpg','localname':'Thunder.jpg','id':'1'}}
<form method="post" name="form1" action="upload.asp?immediate=1" enctype="multipart/form-data"> <input type="file" size="13" name="filedata" /> <input type="submit" size="13" name="submit" value="提交上传" /> </form>
var resText = "{'err':'','msg':{'url':'!upload\/day_110131\/20110131164055468.jpg','localname':'Thunder.jpg','id':'1'}"; var jsonObj = eval("("+resText+")"); document.getElementById('你的表单ID').value=jsonObj.msg.url;