Javascript 以 post 帶入參數並傳值
function post_to_url(params) {
// The rest of this code assumes you are not using a library.
// It can be made less wordy if you use one.
var form = document.getElementById("form1");
var hiddenField = document.createElement("input");
hiddenField.setAttribute("type", "hidden");
hiddenField.setAttribute("name", "login");
hiddenField.setAttribute("value", params);
form.appendChild(hiddenField);
form.method = "post";
form.submit();
}
標籤: javascript
0 個意見:
張貼留言
訂閱 張貼留言 [Atom]
<< 首頁