<!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>我自己寫的這個(gè)是只能將數(shù)據(jù)獲取出來 它自動(dòng)顯示在頁(yè)面上,自己希望實(shí)現(xiàn)的是將數(shù)據(jù)請(qǐng)求到以后,拿一個(gè)對(duì)象接收,然后再以特定格式展示數(shù)據(jù).?解析和展示的的方法我找到了一些代碼,應(yīng)該自己能解決.現(xiàn)在的問題是數(shù)據(jù)請(qǐng)求方法和數(shù)據(jù)接收方法不知道的????求大神指點(diǎn),給個(gè)思路也好.拜謝!!!
- 1 回答
- 0 關(guān)注
- 1103 瀏覽
添加回答
舉報(bào)
0/150
提交
取消