javascript - Uncaught SyntaxError: missing after argument list -
below parsed html of button. basically, it's inside datagrid.
when click on button gives me console error:
uncaught syntaxerror: missing ) after argument list
<button onclick="myfunction(javed@gmail.com)">click</button>
here scripting click event.
function myfunction(e) { alert(e); }
you need pass email string, otherwise, parsed javascript
<button onclick="myfunction('javed@gmail.com')">click</button>
note, not parameters need strings. passing number, function, object,or variable without quotes valid.
if not include quotes, thats parser assume trying pass fail if parameter neither of those.
Comments
Post a Comment