27 lines
613 B
HTML
27 lines
613 B
HTML
|
<!-- shows how the input can be executed by eval -->
|
||
|
|
||
|
|
||
|
<html>
|
||
|
<head>
|
||
|
<title>Test Eval </title>
|
||
|
<script type="text/javascript">
|
||
|
function validate () { // this method is called @ submit
|
||
|
var nerd =document.getElementById("in").value;
|
||
|
alert(document.getElementById("in").value);
|
||
|
eval(nerd); // anykind of string can be executed
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<form name="test" action="" >
|
||
|
Name: <input type="text" name="eingabe" id="in"><br>
|
||
|
<input name="submit" value="submit" type="button" onClick="validate()">
|
||
|
</form>
|
||
|
|
||
|
</body>
|
||
|
</html>
|
||
|
|
||
|
|
||
|
|