Input, button, textarea 1) using disabled, 2) display value, 3) Form submission. 4) Jquery.form.js Ajaxsubmit () No Flush Ajax submission form.

Source: Internet
Author: User

1. Using disabled

Input, button textarea can be disabled,

Effects disabled: 1) The above click events are not available

---

Button: The following OnClick property is not available.

-------------------------

Input

------------------------------

TextArea

2. Input, Textaere displays the previously populated values;

Input: Write on the Value property.

--------------------------------------

TEXTAREA: No value attribute. <textarea> Write here </textarea>

3 using disabled input, textarea submitted without this disabled option.

The above input + textarea is a total of 59,

Only audit 57 is not disabled.

Look at the results of the submission:

4. Submission of Jquery.form.js's ajaxsubmit.

Html:

Js:

1         functionSubmitsy (Taskandjzid, node, Thekey)2         {3             //to remove a bound event:4 $ ("#sy" +taskandjzid). Off ("submit");5 6$ ("#sy" +taskandjzid). Submit (function(event) {7                 /*Act on the event*/8$( This). Ajaxsubmit ({9URL: "Action.php?c=htaskproxy&a=submitsy" + "&taskandjzid=" +taskandjzid+ "&thekey=" +Thekey,TenType: "POST", OneDataType: "JSON", ASuccessfunction(data) { -                         if(Data.code = = 0) { -                             //base.msg ("Error", "Add Failed"); theMsgpic (0); -}Else { -                             //base.msg ("Success", "add Success"); -Msgpic (1); +                         } -  +                         //$ ("#sy" +taskandjzid). Find (". Score"). HTML ("score:" + data.total); A                         //$ ("#sy" +taskandjzid). Find (". Scorearea"). Removeclass ("Hide"); at                     } -                 }); - return false; -             }); -  in}

Attention:

The 4th line removes the previous binding's Submit event,

Line 26th, block the default action for the form.

Input, button, textarea 1) using disabled, 2) display value, 3) Form submission. 4) Jquery.form.js Ajaxsubmit () No Flush Ajax submission form.

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.