<!DOCTYPE?html>
<html?lang="en">
<head>
????<meta?charset="UTF-8">
????<title>fir</title>
</head>
<body>
<form?id="form"?method?=?"post"?action?=?"http://www.kuaidi100.com/query?type=yuantong&postid=postttt&id=1&valicode=&temp=123">
????<label>用戶名:</label>
????<input?type="text"???value="100605028323"??postttt?=?""?id="txt"?/>
????<input?type="submit"?value="確定"??name="submit"?id="sub"/>
</form>
<script>
????var?txt?=?document.getElementById("txt");
????var?btn?=?document.getElementById("sub");
????var?form?=?document.getElementById("form");
????console.log(typeof?form.action);
????btn.onclick=?function?()?{
????????var?action?=?form.action;
????????form.action?=?action.replace(/postttt/,?txt.value);
????}
</script>
</body>
</html>我自己寫的這個是只能將數(shù)據(jù)獲取出來 它自動顯示在頁面上,自己希望實現(xiàn)的是將數(shù)據(jù)請求到以后,拿一個對象接收,然后再以特定格式展示數(shù)據(jù).?解析和展示的的方法我找到了一些代碼,應該自己能解決.現(xiàn)在的問題是數(shù)據(jù)請求方法和數(shù)據(jù)接收方法不知道的????求大神指點,給個思路也好.拜謝!!!
- 1 回答
- 0 關(guān)注
- 1114 瀏覽
添加回答
舉報
0/150
提交
取消