<%@ page language="c#" autoeventwireup="true" codebehind="defualt.asp教程x.cs" inherits="webapplication6.defualt" %>
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="head1" runat="server">
<title></title>
<script src="scripts/jquery-1.4.2.min.js" type="text/网页特效"></script>
<script src="scripts/jquery-ui-1.8.5.custom.min.js" type="text/javascript"></script>
<script src="scripts/jquery.alerts.js" type="text/javascript"></script>
<link href="content/style/jquery.alerts.css教程" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(document).ready(function () {
$("#btnalert").click(function ()
{ jalert('pushed the alert button', 'alert dialog'); });
$("#btnprompt").click(function () {
jprompt('type some value:', '', 'prompt dialog', function (typedvalue) {
if (typedvalue) {
jalert('you typed the following ' + typedvalue);
}
});
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type="button" value="alert me" id="btnalert" />
<input type="button" value="prompt me" id="btnprompt" />
</div>
</form>
</body>
</html>
主要方法有:
jalert(message, [title, callback]) 创建一个alert
jconfirm(message, [title, callback]) 创建一个确认allert,支持callback
jprompt(message, [value, title, callback]) 创建一个提示框让用户输入值