input - jquery onclick setting variable -
i set variable 'api_key' on document load. want modify variable text of input field after clicking button
var api_key = ""; //my button has id named "btn-verify", input field has id named "verify" $("#btn-verify").click({ api_key = $("#verify").val(); });
this doesn't work, how should fix this. how assign api_key value of input field, on click of button
you missing function declaration when binding handler.
change
$("#btn-verify").click({
to
//missing function declaration--v $("#btn-verify").click(function (){
Comments
Post a Comment