HREF is submitted in post mode open

Source: Internet
Author: User

$ ("#newinfo"). Append (' <li class= ' Clearfix "><a onclick=" changeread (this);  Showreport_click (this); " Data= "' + Item.msgid + '" data1= "' +messageurl+ '" class= "Notification-user" > ' + item.variable + ' </a> '


/*

* Function: JS jump page, and post method to submit data

* Parameters: URL jump address paramters parameter

* Return value:

* Creation Time: 20160713

* Create Person:

*/

function Showreport_click () {


var parames = new Array ();

Parames.push ({name: "param1", Value: "param1"});

Parames.push ({name: "param2", Value: "param2"});


Post ("supplierreportpreview.aspx", parames);


return false;

}


/*

* Function: Simulate the submission of form forms

* Parameters: URL jump address paramters parameter

* Return value:

* Creation Time: 20160713

* Create Person:

*/

function Post (URL, paramters) {

Creating form Forms

var temp_form = document.createelement ("form");

Temp_form.action = URL;

To open a new window, the target property of the form should be set to ' _blank '

Temp_form.target = "_self";

Temp_form.method = "POST";

Temp_form.style.display = "None";

Adding parameters

For (var item in paramters) {

var opt = document.createelement ("textarea");

Opt.name = Paramters[item].name;

Opt.value = Paramters[item].value;

Temp_form.appendchild (opt);

}

Document.body.appendChild (Temp_form);

Submit data

Temp_form.submit ();

}


HREF is submitted in post mode open

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.