On a front-end page, you need to submit parameters via JavaScript, use JS to create form forms, and append the parameters into the form to submit the code as follows:
JS Code:
Copy Code code as follows:
Functionloadconfig (Gameurl,skinid) {
Vartemp=document.createelement ("form");
Temp.action= "${createlink (Controller: ' Mobileconfig ', Action: ' Beforelaunchconfig ')}";
Temp.method= "POST";
Temp.style.visibility= "hidden";
Varopt=document.createelement ("input");
Opt.name= "Gameurl";
Opt.id= "Gameurl";
Opt.value=gameurl;
Varopt2=document.createelement ("input");
Opt2.name= "SkinId";
Opt2.id= "SkinId";
Opt2.value=skinid;
Temp.appendchild (opt);
Temp.appendchild (OPT2);
Temp.submit ();
}
The feature was successfully run on both Chrome and Safari, but was not successfully submitted when using Firefox (17.0.1), and after research found that Firefox submitted a page form when it required a complete label for the page, that is
JS Code:
Copy Code code as follows:
Functionloadconfig (Gameurl,skinid) {
Varpagediv=document.getelementbyid ("page");
Vartemp=document.createelement ("form");
Temp.action= "${createlink (Controller: ' Mobileconfig ', Action: ' Beforelaunchconfig ')}";
Temp.method= "POST";
Temp.style.visibility= "hidden";
Temp.name= "Loadconfigpage";
Varopt=document.createelement ("input");
Opt.name= "Gameurl";
Opt.id= "Gameurl";
Opt.value=gameurl;
Varopt2=document.createelement ("input");
Opt2.name= "SkinId";
Opt2.id= "SkinId";
Opt2.value=skinid;
Temp.appendchild (opt);
Temp.appendchild (OPT2);
Pagediv.appendchild (temp);
Temp.submit ();
}
Append the form form created here in the <body> tab, and then commit it.