当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: waiting for you...... ......
    摘要: 在本机上写php+mysql,发布时将数据库文件和脚本一同上传,但数据库文件没有固定的存放位置...脚本是怎么找到数据库文件的?? ......


怎样提交判断text是空就弹出一个窗口警告啊

怎样提交判断text是空就弹出一个窗口警告的代码怎样写啊~?

NO.1   作者: Jaron

<script>  
  function   checkform(){  
  if   (form1.txt1.value==""){  
  alert("不能为空");  
  return   false;  
  }  
  }  
  </script>  
   
  <form   id=form1   onsubmit="return   checkform();">  
  <input   type=text   name=txt1>  
  <input   type=submit   name=ok   value=submit>  
  </form>

NO.2   作者: yanfeng

呵呵,上面的对,不过VBSCRIPT也可以  
  <script   language=vbscript>  
  function   checkform()  
      if   (form1.txt1.value=="")   then  
          msg("不能为空")  
      end   if  
  </script>  
 

NO.3   作者: dgm8

<script>  
  function   checkform()  
      dim   errflag,   msg  
      errflag   =   True  
   
      If   len(trim(theForm.text1.value))=   0   then  
            msg   =   "不能为空"  
            MsgBox   msg,   64,   "警告!"  
            focusto(0)  
            errflag   =   false  
            Exit   Function  
      End   if  
   
      checkform   =   errflag  
      theForm.Submit  
  End   Function  
   
  sub   focusto(x)  
          document.theForm.elements(x).focus()  
  end   sub  
  </script>  
   
   
   
  <form   name=theform>  
  <input   type=text   name=txt1>  
  <input   type=button   name=ok   value=submit>  
  </form>  
 


    摘要: 我的主板是精英b6bapa+的 ,2000年的板子 买了一块新80g的硬盘,原来的40g挂上去,勉强进了windows,太慢了,无法用啊 我把原来的40g拆下来,换上同学的20g,挂上去没问题!很好 我把我的80g卸下来,换上40g的,没问题 说明: 1,硬盘都没问题 2,我的板子支持80+20=100g,没问题 3,80+40=120g?不行啊 怎么办啊,总不能换块板子吧? 老鸟们有什么......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE