I want to pass a value from a user input in a html to jQuery.ajax. Here's the code for my JS file:
jQuery(document).ready(function() {
jQuery.ajax({
type: 'POST',
url: 'myurl.aspx',
data: {
action: 'something',
count: txtCount
}
});
});
and here's my html file:
Count: <input type="text" id="txtCount" name="count" />
<input id="btnSubmit" type="Submit" value="Submit" />
<div> output somewhere here</div>
My javascript is working, I just removed some of the codes since i'm just pointing out on how to pass the values from the html to my ajax. I'm trying to develop a Chrome Packaged App.
count: $('#txtCount').val()