Home > Web Front-end > JS Tutorial > js post method to deliver the submitted implementation code_form effects

js post method to deliver the submitted implementation code_form effects

WBOY
Release: 2016-05-16 18:26:01
Original
1001 people have browsed it
复制代码 代码如下:

var myForm = document.createElement("form");
myForm.method="get" ;
myForm.action = "line_ticket.aspx" ;
var myInput = document.createElement("input") ;
myInput.setAttribute("name", "id") ;
myInput.setAttribute("value", idStr);
myForm.appendChild(myInput) ;

var myInput2 = document.createElement("input") ;
myInput2.setAttribute("name", "fid") ;
myInput2.setAttribute("value", fid);
myForm.appendChild(myInput2) ;

var myInput3 = document.createElement("input") ;
myInput3.setAttribute("name", "unlock") ;
myInput3.setAttribute("value", unlock);
myForm.appendChild(myInput3) ;

var myInput4 = document.createElement("input") ;
myInput4.setAttribute("name", "Option") ;
myInput4.setAttribute("value", "del");
myForm.appendChild(myInput4) ;
document.body.appendChild(myForm) ;
myForm.submit() ;
document.body.removeChild(myForm) ;
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template