你连form的name也不起一个啊??怎么得到值??

解决方案 »

  1.   

    return checkform(this) 后面少了;
      

  2.   

    kaibinsj(天翔):
    有具体的解决办法吗? Morose(~郁闷~):
    少了什么?
      

  3.   

    路克<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head>
    <script>
    function check(){
    uid = document.form1.uid.value;
    if(uid.length==""){
    alert("uid can't be blank");
    return false;
    }
    return true;
    }
    </script>
    <body>
    <form name="form1" method="post" action="" onSubmit="check()">
      <input name="uid" type="text" id="uid">
      <input type="submit" name="Submit" value="Submit">
    </form></body>
    </html>
      

  4.   

    kaibinsj(天翔):
    请问document.form1.uid.value;中的document是什么啊?
      

  5.   

    1:<SCRIPT language="JavaScript">
    2:function isEmpty(str)
     {
      if((str==null)||(str.length()==0))retrun trus;
      else retrun false;
     }
    retrun-->return
    3:假设你的str是从form(Form的属性:name="frm")里的某个name="txtQ"传来的
    function isEmpty(str)
    -->
    function isEmpty(frm.txtQ.value)
    好多好多麻烦的地方,先去找点JS的教材看看再说