Home > Web Front-end > JS Tutorial > body text

Examples of two methods of using POST pop-up windows_javascript skills

WBOY
Release: 2016-05-16 17:01:43
Original
832 people have browsed it

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

1.

Copy code The code is as follows:

var $form1=$("
");
$form1.append($(""));
var scriptStr="";
$("body").append($form1);
var newWindow=openwin("",null,800,600);
newWindow.document.write($form1[0].outerHTML scriptStr) ;

2.
Copy code The code is as follows:

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.
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!