javascript can't pass string to my function -




i calling function parameter date string "24/08/2017" , function

function openedit(dateid){     alert(dateid);     } 

and it's return 0.00013882002974714924. function call like

<button onclick="openedit(datestring)"></button> 

use if using server side technology

<button onclick="openedit(\''+datestring+'\')"></button>  

or

<button onclick="openedit('<yourdate>')"></button> 

you need add quotes around datestring





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -