在使用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>