surii.net/hack/dialog.html

57 lines
1.5 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>dialog</title>
<meta name="description" content="Check 3DS's native dialogs">
<meta name="author" content="Ryan Westphal">
<meta name="viewport" content="width=device-width, initial-scale=">
<link href="../css/surii.css" rel="stylesheet" type="text/css" />
</head>
<body class="skinnyscroll">
<div>
<h1>dialog</h1>
<p>This page tests some various dialogs.</p>
<h2>alert</h2>
<p>A basic alert</p>
<button id="cmdAlert" type="button">alert</button>
<h2>confirm</h2>
<p>A yes or no question.</p>
<button id="cmdConfirm" type="button">confirm</button>
<p id="lblConfirm"></p>
<h2>prompt</h2>
<p>A request for modal user input.</p>
<button id="cmdPrompt" type="button">prompt</button>
<p id="lblPrompt"></p>
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript" src="../js/surii.js"></script>
<script>
$(function() {
$("#cmdAlert").click(function() {
alert("I AM ALERT.");
});
$("#cmdConfirm").click(function() {
if (confirm("Do you want to play a game?")) {
$("#lblConfirm").text("Game on!");
} else {
$("#lblConfirm").text("Sad panda!");
}
});
$("#cmdPrompt").click(function() {
var value = prompt("Buy something, will ya?", "sword");
$("#lblPrompt").text("You bought: " + value);
});
});
</script>
</body>
</html>