ASP.Net AJAX RC 調用Google Adsense代碼出現的Sys.FormatException問題

在使用ASP.NET AJAX RC 開發Web應用程序時,如果調用Google Adsense廣告代碼,可能會出現JS腳本錯誤,錯誤描述爲Sys.FormatException,查找相關的文章,在Adsense廣告代碼前插入以下腳本,即可解決此問題,產生此錯誤的原因,可瀏覽 http://weblogs.asp.net/lkempe/archive/2006/12/22/asp-net-ajax-rc-and-google-adsense.aspx 相關的文檔

<script type="text/javascript">
                Date.__cyril_parse = Date.parse;
                Date.parse = function(s){
                    try {
                        return Date.__cyril_parse(s);
                    } catch (e){
                        var d = Date._jsParse(s);
                        if (d) {
                            return d;
                        } else {
                            throw e;
                        }
                    }
                }
</script>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章