jQuery 1.9.1 + jquery.validate.unobtrusive 的一個相容問題

使用 jquery.validate.unobtrusive 的環境下,如果將 jQuery 升級到 1.9.0+ 版本的時候,會在 form 的 submit 事件引發時,發生 "SyntaxError: JSON.parse: unexpected character" 錯誤,依據Aeronaught's Blog 所分析的結果,似乎是 $.parseJSON() 行為上的差異造成的,因此,有使用者回報到 Microsoft 請 MS 調整 jquery.validate.unobtrusive 以相容 jQuery v1.9.0 以上的變更。

由於 jQuery v1.9 是 jQuery 支援 IE8 的最後版本,從 2.0 之後將不再支援 IE9 以前的版本,而目前 Windows XP 的使用者仍相當多,IE8 在現有 Web Browser share 也依舊佔有相當比例,因此 jQuery 1.9 的地位仍相當重要,至少,在 Windows XP 退出生態前,在 public web site 的設計上,仍要考慮 IE8 的存在而不能採用 jQuery 2.0+。

References:

[2013/04/30]
透過 Visual Studio NuGet 取得的版本已經修正這個問題。

分類: 射茶包,標籤: 。這篇內容的永久連結