javascript - How to check button value in java script -


i wanna check button value in java script(mvc),here mycode:

            <span>             <input type="button" value='@l("follow")'  onclick='return   follow(this)' />         </span> 

and in js:

function follow(btn) { if ($(btn).defaultvalue == "follow") { } 

jquery

function follow() {   var buttonval = $('button').val();  // check  } 

Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -