I want to print a alert massage with the value of select in this mode:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE"Javascript">
<!--
function getname(str)
{
alert("Ciao, "+str+"!"
;
}
//-->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="">
<select name="select" onblur="getname(this.value)">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
<p><input type="text" name="textfield" >
</p></form>
</body>
</html>
Why this.value don't display me nothing?
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE"Javascript">
<!--
function getname(str)
{
alert("Ciao, "+str+"!"
}
//-->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="">
<select name="select" onblur="getname(this.value)">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
<p><input type="text" name="textfield" >
</p></form>
</body>
</html>
Why this.value don't display me nothing?