Network already has this function function, is a pure JS implementation, this article introduces the use of jquery implementation, the need for friends can refer to the following
The function on the network already has this function, is realizes with the pure JS. However, it was found in the project that this function was not compatible with Firefox, and I rewrote this method . code as follows://default New window configuration var windowdefaultconfig = new object; windowdefaultconfig[' directories '] = ' no '; windowdefaultconfig[' location ' = ' no '; windowdefaultconfig[' MenuBar '] = ' no '; windowdefaultconfig[' resizable '] = ' yes '; windowdefaultconfig[' scrollbars '] = ' yes '; windowdefaultconfig[' status ' = ' no '; windowdefaultconfig[' toolbar '] = ' no '; code as follows:/** * jquery implementation @param that opens a new window as a post form: URL needs to open url @param: args URL parameters, the data type is object @param: Name opens the URL window, If the same button needs to repeatedly open a new window, instead of refreshing it on the first open window, this parameter should be different each time @param: Windowparam The parameter configuration of the new open window * @author: Haijiang.mo */ function Jqueryopenpostwindow (url,args,name,windowparam) { //Create a Form object var _form = $ ("<form></form>",{ ' id ': ' tempform ', ' method ': ' Post ', ' action ':url, ' target ': name, ' style ': ' Display:none ' } '. Appendto ($ ("BodY ")); //Add hidden fields to the form for (var i in args) { _form.append ($ (" <input> ", {' type ': ' Hidden ', ' name '): I, ' value ': args[i]}); } //Clone window Parameter Object var windowconfig = Clone (windowdefaultconfig); //Configuration window for (var i in Windowparam) { windowconfig[i] = windowparam[i]; } //window configuration string &nbs P var windowconfigstr = ""; for (var i in windowconfig) { windowconfigstr + = i+ "=" +windowconfig[i]+ "; &nb Sp } //Binding Commit trigger Event _form.bind (' Submit ', function () { window.open ("About:blank", name, WINDOWCONFIGSTR); }); //Trigger Commit event _form.trigger ("submit"); //form deletion _form.remove (); } Record down, later can use.