The following link says I can add only one event handler per item.
I created a text box and added two functions test1() and test2(). They worked nicely but according to the link only one should work. Can you please explain what is happening here.
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="register1.js"></script>
</head>
<body>
<form method="post" name="formRegister">
<input id="namel" type="text" maxlength="5" name="txtFirstName" value="Tanvir" onclick="test1();test2();">
</form>
</body>
</html>
The js code :
function test1()
{
alert(" alert one ");
}
function test2()
{
var i = 12;
alert(" alert two " + i);
}