2

我不知道發生了什麼,但是我的jquery validate插件(1.5.5)不起作用,我不確定自從我做了大部分測試在Firefox上。在IE 8中使用Jquery.Validate插件獲取錯誤

問題是這我去我的表單之一,jquery驗證它,並打我的「創建」按鈕我的驗證踢在它應該在所有的瀏覽器,包括IE8這樣做的權利。現在它不起作用的地方是我這樣做的時候。

我選擇第一個下拉列表並選擇一些東西。然後點擊「創建」現在所有的驗證錯誤應該顯示期望第一個下拉框。

爲此,它會在所有的瀏覽器除IE 8我得到這個

網頁錯誤的詳細信息

用戶代理:Mozilla的/ 4.0(兼容; MSIE 8.0; Windows NT的6.1; Win64的; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0)時間戳:Sun,2009年11月8日 03 :26:08 UTC

消息:所需的對象行:890 字符:5代碼:0 URI: http://localhost:3668/Scripts/Plugins-Development/jquery.validate.js

這是在線路890

return options.length > 0 && (element.type == "select-multiple" || ($.browser.msie && !(options[0].attributes['value'].specified) ? options[0].text : options[0].value).length > 0); 

這就像整個方法塊。

methods: { 

    // http://docs.jquery.com/Plugins/Validation/Methods/required 
    required: function(value, element, param) { 
     // check if dependency is met 
     if (!this.depend(param, element)) 
      return "dependency-mismatch"; 
     switch(element.nodeName.toLowerCase()) { 
     case 'select': 
      var options = $("option:selected", element); 
      return options.length > 0 && (element.type == "select-multiple" || ($.browser.msie && !(options[0].attributes['value'].specified) ? options[0].text : options[0].value).length > 0); 
     case 'input': 
      if (this.checkable(element)) 
       return this.getLength(value, element) > 0; 
     default: 
      return $.trim(value).length > 0; 
     } 
    }, 

不知道發生了什麼事情。

回答