How do I use JQuery's event handler use a textbox with a submit button? -
I am a new JQuery user and submitting text through a text box and a list of a submit button on the web browser window As an item which adds to the end of an unordered list.
HTML: JS: Q: Will you use jQuery event handlers to submit text in a text box and submit my text using a HTTP request? Any advice and coding examples will be appreciated! Thanks! Create a form, enter all the form fields in it, then share the submit button < Previous>
& lt; Ul class = "list" & gt; & Lt; Li & gt; & Lt; / Li & gt; & Lt; / Ul & gt;
var text = $ ('text'); Var submit = $ ('submit');
var text a = $ ('. Text'); Var submit = $ ('. Submit'); Submit.click (function () {$ .ajax ({url: 'yourServerURL', type: 'post', data: text.val ()});});
Comments
Post a Comment