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

Popular posts from this blog

symfony - InvalidConfigurationException in SecurityExtension.php line 429: No authentication listener registered for firewall "secured_area" -

angular ui router - 10 digest iterations reached in angularjs when using $state.go -

javascript - Handling constructor related functions while testing with mocha and sinon -