慕森卡
2018-12-07 02:00:18
<body><input type="file" id="filepaht"/><input type="button" id="checkAdd"/><script type="text/javascript">$("#checkAdd").click(function(){?? ?var sur= $("#filepaht").text();?? ?$.ajax({? type: 'get',? url: sur,? dataType: "xml",? error:function(){alert("ERR")},? success: function(xml){alert(xml)}? ?});});</script></body>
8 回答

胡子哥哥
TA貢獻1825條經驗 獲得超6個贊
<script type="text/javascript">
$("#checkAdd").click(function(){
?? ?var sur= $("#filepaht").text();
?? ?$.ajax({
? type: 'get',
? url: sur,
? dataType: "xml",
? error:function(){alert("ERR")},
? success: function(xml){alert(xml)}
? ?
});
});
</script>
</body>
?
本地文件的路徑,然后當做ajax請求的路徑,樓主覺得可運行???
添加回答
舉報
0/150
提交
取消