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

smartface.io - Proper way to change color scheme for whole application -

javascript - three.js lot of meshes optimization -

Email notification in google apps script -