I would like to know how to declare a variable in jQuery
The code I am currently using is
$.name = 'anirudha';
alert($.name);
That code works fine, but if I write it as
$.name = document.myForm.txtname.value;
alert($.name);
Then my code does not work.
it will write the variable you have declared upper
In jquery, u can delcare variable two styles.
One is,
Second is,
Second is used when you read data from
textbox
,label
, etc.