1.枚举
cataid=checkstr(request("cataid"),1)
select case cataid case 1 ntitle="新闻" case 2 ntitle="广告" case 3 ntitle="书籍" case 4 ntitle="名师" case 9 ntitle="频道" end select
2.验证
if (document.myform.lesson_up.value == ""){
alert("请选择科目!"); document.myform.lesson_up.focus(); return false; } if (!isNumber(document.myform.FeePrice.value)){ alert("请输正确的代报名费价格!"); document.myform.FeePrice.focus(); return false; }function isNumber(oNum)
{ if(!oNum) return false; var strP=/^\d+(\.\d+)?$/; if(!strP.test(oNum)) return false; try{ if(parseFloat(oNum)!=oNum) return false; } catch(ex){ return false; } return true; }
3.添加之后刷新
response.Write "<script language='javascript'>"
response.Write "alert('删除成功!');" response.Write "window.close();" response.Write "window.opener.location.reload();" response.Write "</script>"