Home >
Article > Web Front-end > Examples of two methods of using POST pop-up windows_javascript skills
Examples of two methods of using POST pop-up windows_javascript skills
WBOYOriginal
2016-05-16 17:01:43861browse
Recently, I was working on a function that required a pop-up window, but I couldn’t use the get method because the get method has restrictions on the length of the URL, so I had to use post. I summarized two methods
var $form1=$(""); $form1.append($("")); var scriptStr=""; $("body").append($form1); var newWindow=openwin("",null,800,600); newWindow.document.write($form1[0].outerHTML scriptStr) ;
var $form1=$(""); for(var i in params){ $form1.append($("")) ; } $("body").append($form1); var newWindow=openwin("",'newWindow1',800,600); $form1.submit();
The effects of these two methods are not much different. They both pop up a window first, and then let the pop-up window submit the post.
Statement:
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