简体   繁体   English

在javascript中无法在IE中运行的函数调用

[英]call to function in javascript not working in IE

need your help again... for javascript :) see below the code.. 再次需要您的帮助...对于javascript :)参见下面的代码。

           var x=input;
            var atpos=x.indexOf("@");
            var dotpos=x.lastIndexOf(".");
            if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
                 {
                    username=input;
                    check_username.call();
                 }
             else
                 {
                     email=input;
                     check_email.call();
                 }

and the actual function goes below... (just a sample start of the pgm) 并且实际功能低于...(只是pgm的示例开始)

 function check_username()  
      {
          if (username!="")
          {
              var xmlhttp;    
              {
                if (window.XMLHttpRequest)

the call to the function works well with Chrome and Firefox. 对该函数的调用在Chrome和Firefox上运行良好。 But doesn't get triggered with IE 8 :( i get the error message - object expected... can you please share me the code i need to use - for calling function. thanks again! :) 但是不会被IE 8触发:(我收到错误消息-预期的对象...您能否分享给我我需要使用的代码-用于调用函数。再次感谢!:)

check_username.call(this);

check_email.call(this);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM