Issue 2091:window.resizeTo() doesn't have any effect
http://www.cnblogs.com/lonz/articles/381022.html
http://code.google.com/p/chromium/issues/detail?id=11523
解決方案:
CSS to disable resizing textarea { resize: none; } <textarea name="foo"> textarea[name=foo] { resize: none; } HTML is <textarea id="foo">) #foo { resize: none; }
http://www.brainjar.com/js/crunch/demo.html
缺點:
會把正則表達式中類似*/去除
Sample:
value = s.replace(/^0*/, '');
After Compress:
value = s.replace(/^0, '');
http://hi.baidu.com/iloverobot/blog/item/bd3ed651ffd362868c5430bf.html
http://blog.csdn.net/chinaontology/archive/2007/12/30/2004871.aspx
http://www.cnblogs.com/zengxiangzhan/archive/2010/01/14/1647866.html
http://acme.com/javascript/
http://home.phpchina.com/space.php?uid=155537&do=blog&id=182698
http://www.cnblogs.com/sxlfybb/archive/2009/06/04/1495995.html
http://www.dotblogs.com.tw/puma/archive/2009/03/10/7426.aspx
http://phpxiaoxin.javaeye.com/blog/350544
http://hi.baidu.com/sihillver/blog/item/4d6f32f592920325bc3109d7.html
http://kb.cnblogs.com/page/50337/
http://kb.cnblogs.com/page/53517/
http://kb.cnblogs.com/page/53433/
first of all sorry about my english, it's not my native lengauge... i have a xml file that i'm reading with the sample code above...but when i try to read it from a service web page (http://www.google.com/ig/api?weather=Buenos%20A...),it doesn't show anything... and if i write the same content of this page in a xml file in my pc,
it works perfectly... i dont know what am i doing wrong i let u the code that i'm using maybe u could help me function clima(){ $.ajax({ type: "GET", url: 'http://www.google.com/ig/api?weather=Buenos%20Aires', dataType: "xml", success: function(data){ var $weather = $(data).find('current_conditions') console.log($weather); } }); } function clima() { $.ajax({ type: "GET", dataType: "xml", url: 'http://www.google.com/ig/api?weather=Buenos%20Aires', success: function(xml) { var weather = $(xml).find("current_conditions").find("temp_c").attr("data"); alert("Prognostico para hoy: " + weather + " grados"); } }); }
http://css9.net/img-fullsize/
http://css9.net/wp-content/uploads/2009/04/fullsize/example.html
有關於$.ajaxSetup和$.get的問題
在Common.js中使用
$.ajaxSetup({ url: "…..", type: "POST", cache: true, dataType: "json" }); $.ajax({ data: { cityCode: cityCode, flag: flag }, success: function(areaList) { …} });在PageA頁面引入Common.js
然後在腳本段中使用 $.get(url);
此處url調用的是一個aspx頁面,顯示結果為無數據加載!(正常情況:有數據加載。)
然後經過使用IE8的開發人員工具,進行Trace Error.最終發現原因錯誤信息(如下)
"Invalid JSON: <form name="form1" method="post" action="ajax_select
那麼如何解決呢?
原因:
肯定是請求數據類型有問題?
解決方案:
1.在Page A 頁面腳本段 $.get(url,“html”);
因為$.get中的Data是可選項,現在確定原因之後,我們就來預定義好DataType
結果:OK
分析源由:
是因為$.ajaxSetup是用全局設定的,所以全局已經設定了DataType:JSON了。
那Page A 頁面的$.get()肯定受及影響。
最終解決方案:
改Common.js,去掉ajaxSetup全局設定
$.ajax({ url: "…..", type: "POST", cache: true, dataType: "json",data: { cityCode: cityCode, flag: flag }, success: function(areaList) { …} });
結果:OK