function CheckSubmit(){ 
    var thdx =""; 
    thdx=document.all("thdx").value; 
    alert(thdx);//看看真的是279977吗??
    if(thdx==279977){ 
        sendCallback(); 
    }else{
        toSubmit(); 
    }

解决方案 »

  1.   

    alert(thdx);//看看真的是279977吗??真的是的,非常奇怪!从没遇到这样的问题!
      

  2.   

    肯定是你其他地方的错误~我的没问题。。想也知道没问题<input id="thdx" type="text" />
    <input type="button" onclick="CheckSubmit()" value="检查是不是279977" />
    <script>
    function CheckSubmit(){ 
        var thdx =""; 
        thdx=document.all("thdx").value; 
        if(thdx==279977){ 
            sendCallback(); 
        }else{
            toSubmit(); 
        }

    function toSubmit(){
       alert("toSubmit");
    }
    function sendCallback(){
       alert("sendCallback");
    }
    </script>
      

  3.   

    谢谢 问题已经解决!
     是因为页面内含有两个name=thdx的文本框谢谢大家