javascript - Creating form to apply get variable -
i have number html 5 field , button next it. after typing in number, user clicks button, , number set $_get['number']
variable on same website.
how can that?
i don't wanna using redirections (form tag etc.). possible aria controls here? like:
<select userid="select_user_type" name="dyntable_length" size="1" aria-controls="dyntable" onchange="location = this.options[this.selectedindex].value;"> <option value="path1"></option> <option value="path2"></option> </select>
but number field , after clicking button?
you like:
$("#button").click(function(e) { var number = $('#number').val(); $.ajax({ url : 'http://example.com', type: "post", data : { number : number }, success:function(data, textstatus, jqxhr) { // handle request success //data contains server's response }, error: function(jqxhr, textstatus, errorthrown) { // handle request failure } }); });
Comments
Post a Comment