2016-01-12 07:34:09 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
2016-01-14 07:01:58 +01:00
|
|
|
<script type="text/javascript">
|
2016-10-27 09:16:19 +02:00
|
|
|
function prompter(defaultval) {
|
|
|
|
var reply = prompt("js prompt", defaultval);
|
|
|
|
console.log("Prompt reply: " + reply);
|
2016-01-14 07:01:58 +01:00
|
|
|
}
|
|
|
|
</script>
|
2016-01-12 07:34:09 +01:00
|
|
|
</head>
|
|
|
|
<body>
|
2016-10-27 09:16:19 +02:00
|
|
|
<input type="button" onclick="prompter('')" value="Show prompt" id="button">
|
|
|
|
<input type="button" onclick="prompter('default')" value="Show prompt with default value" id="button-default">
|
2016-01-12 07:34:09 +01:00
|
|
|
</body>
|
|
|
|
</html>
|