Hi I'm very new to all this stuff, so if someone could help I'd be most appreciative!
I'm trying to write a test script that will get the number entered into a field and print it onscreen using identifiers - unfortunately the below doesn't work - can anyone point out where I'm being stupid - I've seen scripts using ["name_of_element"] to identify the exact part they want, but it doesn't work for me!![]()
<head>
<script language="JavaScript">
var main_variable = new Number();
function printVariables()
{
document.write(document.["test"].value);
}
</script>
</head>
<body>
<input type="text" name="test"><br>
<input type="submit" value="Show Numbers" onClick="printVariables()">
</body>



Reply With Quote
Bookmarks