Form data submission, form data submission

Source: Internet
Author: User

Form data submission, form data submission

Js Code:

// Form jump to gotourl // the page to jump to options json format Parameter function FromGoTo (gotourl, options) {var inputhtml = ""; for (var attr in options) {var inputname = attr; var inputvalue = options [attr]; inputhtml + = "<input style = \" visibility: hidden; \ "type = \" text \ "name = \" "+ inputname +" \ "value = \" "+ inputvalue +" \ "/>"} var fromhtml = "< form id = \ "subimtFromGoTo \" method = \ "post \" action = \ "" + gotourl + "\" style = \ "display: none; \ "target = \" _ blank \ ">" + inputhtml "</form>"; $ ("# subimtFromGoTo "). remove (); $ ("body "). append (fromhtml); $ ("# subimtFromGoTo "). submit ();}
function Preview() {    var news_title = $("input#txtTitle").val().trim();    var news_postdate = $("input#txtDate").val().trim();    var news_content = CKEDITOR.instances["div_content"].getData().trim();    var options={"title":news_title,"postdate":news_postdate,"content":news_content};    var gotourl="http://" + window.location.host + "/BaseAdmin/PrevNews.aspx";    FromGoTo(gotourl, options);}

 

Related Article

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.