Hi,
I'm a beginner with JavaScript and i can't figure out why i get this error: "Object Expected". I have the following code:
I get the error on the 18th line (after i click the "addButton" ). At this point, it should only display a message (in the future, it will do something else). Please, tell me if you know why i get the error.
Thank you.
I'm a beginner with JavaScript and i can't figure out why i get this error: "Object Expected". I have the following code:
Code:
<html>
<head>
<SCRIPT language="Javascript" type=”text/javascript”>
function adunare(){
alert('please work');
}
</SCRIPT>
</head>
<body>
<form name="form1">
<H3 align="center"><B>Formular</B></H3>
<P>Nume <INPUT type="text" name="nume"/></P>
<P>Prenume <INPUT type="text" name="prenume"/></P>
<P>Gender <INPUT type="radio" name="gender">Male</INPUT>
<INPUT type="radio" name="gender">Female</INPUT></P>
<P><INPUT type="text" name="first">Number1</INPUT></P>
<P><INPUT type="text" name="second">Number2</INPUT></P>
<P><INPUT type="button" value="+" name="addButton" onClick="adunare()"/>
<INPUT type="button" value="-" name="subButton"/></P>
<P><TEXTAREA name="txtarea" rows="20"></TEXTAREA></P>
<P><INPUT type=submit name=submit value="Submit"/></P>
</form>
</body>
</html>
Thank you.
Comment