<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
?<HEAD>
? <TITLE> New Document </TITLE>
? <META NAME="Generator" CONTENT="EditPlus">
? <META NAME="Author" CONTENT="">
? <META NAME="Keywords" CONTENT="">
? <META NAME="Description" CONTENT="">
? <link type="text/css" rel="stylesheet" href="examples.css">
? <script type="text/javascript" src="jquery-1.5.1.min.js"></script>
? <script type="text/javascript" src="jquery-impromptu.3.1.min.js"></script>
? <script type="text/javascript" >
? $(function(){
???? ??? var txt = '测试点击一下这个提交:<br /> <input type="text" id="alertName" name="myname" value="" />';
function mysubmitfunc(v,m,f){
?an = m.children('#alertName');
?if(an.val()== ""){
??an.css("border","solid #ff0000 1px");
??return false;
?}
?return true;
}
$("#but").click(function(){
??? $.prompt(txt,{submit:mysubmitfunc,buttons:{提交:true}});
})
})
? </script>
?</HEAD>
?<BODY>
<input type="button" id="but" value="测试"/>
?</BODY>
</HTML>