Recently, it is necessary to pop up a function, but you cannot use the GET method. Because the GET method is limited to the length of the URL, you must use POST.
1. 1.
Copy code code as follows:
var $ Form1 = $ ("<FORM ACTION = '"+URL+"' ID = 'F'name =' f 'method =' post '> </form>");
$ form1.append ($ (<input type = 'hidden' name = '"+i+"' value = '"+params [i]+"'/> ");
var scriptstr = "<script type = 'text/javascript'> document.f.submit (); </script>" ";
$ ("body"). Append ($ form1);
var newwindow = openwin ("", null, 800,600);
newwindow.document.write ($ form1 [0] .outerhtml+scriptstr);
2.
Copy code code as follows:
var $ Form1 = $ ("<FORM ACTION = '"+URL+"' ID = 'F' Name = 'F' Target = 'Newwindow1' Method = 'Post'> </Form>"))
for (var I in params) {
$ form1.append ($ (<input type = 'hidden' name = '"+i+"' value = '"+params [i]+"'/> ");
}
$ ("body"). Append ($ form1);
var newwindow = Openwin ("", 'Newwindow1', 800,600);
$ form1.submit ();
The effects of these two methods are not much different. They first pop up a window, and then let the pop -up window submit