I get a problem with JavaScript Console
. I did a login form example. In this example when ever clicks a login button it goes to corresponding events in the JS. Here the problem is i write some console logs in JS, In this console logs are shows when ever clicks login button then immediately hiding means just come and with in fraction of seconds its hiding.So I didn't have any idea so please see the below code and suggest me.
HTML Code :
<template name="login">
<form id="login-form" action="action">
<div>
<h2> Login<h2>
<input type="text" id="email" placeholder="Email" /><br>
<input type="password" id="pwd" placeholder="Password" /><br>
<input type="submit" value="Login" id="login" />
</div>
</form>
</template>
JS Code :
Template.login.events
({
'submit #login-form' : function ()
{
// template data, if any, is available in 'this'
if (typeof console !== 'undefined')
console.log("You pressed the button");
}
});