日期:2014-05-16  浏览次数:20275 次

表单提交后,显示注册的信息
大家请看下面的代码,我提交后只是刷新了一下,怎么回事啊??
<script>
function   my()
{
f=document.myform;
if(f.ming.value== " ")
{
alert( "请填写完整! ");
f.ming.focus();
return   false;
}
return   true;
var   ming=f.ming.value;
document.write( " <h2> 您的注册信息如下: </h2> ");
document.write( " <hr> ");
document.write( " <br> 物业名称: "+ming);
</script>
</head>

<body   bgcolor= "#CAE4FF ">
<h1   align= "center "> <font   color= "#0033FF "   face= "华文彩云 "> 请输入房源信息 </font> </h1>
<form   name= "myform "   onSubmit= "return   my() ">
<table   bgcolor= "#CAE4FF "   align= "center "   border= "2 ">
<tr>
<td> 物业名称: <input   type= "text "   name= "ming "   value= " "> </td>
</tr>
</table>
<p   align= "center "> <input   type= "submit "   name= "cheng "   value= "完成 "> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input   type= "reset "   name= "chong "   value= "重写 "> </p>
</form>
</body>

------解决方案--------------------
你的东西有问题啊!