国产精品第二页,亚洲精品国产精品国产自,一区二区三区亚洲http://www.aygfsteel.com/itvincent/category/18186.html技術引領時代!zh-cnSun, 31 Jul 2011 13:22:28 GMTSun, 31 Jul 2011 13:22:28 GMT60用java將html轉化生成png,gif,jpg等圖片http://www.aygfsteel.com/itvincent/archive/2011/07/30/355389.htmlitVincentitVincentSat, 30 Jul 2011 03:58:00 GMThttp://www.aygfsteel.com/itvincent/archive/2011/07/30/355389.htmlhttp://www.aygfsteel.com/itvincent/comments/355389.htmlhttp://www.aygfsteel.com/itvincent/archive/2011/07/30/355389.html#Feedback0http://www.aygfsteel.com/itvincent/comments/commentRss/355389.htmlhttp://www.aygfsteel.com/itvincent/services/trackbacks/355389.html
http://code.google.com/p/java-html2image/

 例子:
HtmlImageGenerator imageGenerator = new HtmlImageGenerator();
imageGenerator
.loadHtml("<b>Hello World!</b> Please goto <a title=\"Goto Google\" href=\"http://www.google.com\">Google</a>.");
imageGenerator
.saveAsImage("hello-world.png");
imageGenerator
.saveAsHtmlWithMap("hello-world.html", "hello-world.png"


itVincent 2011-07-30 11:58 發表評論
]]>
長連接cometD技術筆記http://www.aygfsteel.com/itvincent/archive/2011/07/27/355155.htmlitVincentitVincentWed, 27 Jul 2011 08:20:00 GMThttp://www.aygfsteel.com/itvincent/archive/2011/07/27/355155.htmlhttp://www.aygfsteel.com/itvincent/comments/355155.htmlhttp://www.aygfsteel.com/itvincent/archive/2011/07/27/355155.html#Feedback0http://www.aygfsteel.com/itvincent/comments/commentRss/355155.htmlhttp://www.aygfsteel.com/itvincent/services/trackbacks/355155.html長連接cometD技術筆記

官方主頁: http://cometd.org/

介紹
http://www.infoq.com/cn/news/2010/05/websockets-bayeux
grails plugins          http://www.grails.org/plugin/cometd


itVincent 2011-07-27 16:20 發表評論
]]>
jQuery1.4 的 JSON 問題http://www.aygfsteel.com/itvincent/archive/2010/03/03/314417.htmlitVincentitVincentWed, 03 Mar 2010 08:11:00 GMThttp://www.aygfsteel.com/itvincent/archive/2010/03/03/314417.htmlhttp://www.aygfsteel.com/itvincent/comments/314417.htmlhttp://www.aygfsteel.com/itvincent/archive/2010/03/03/314417.html#Feedback0http://www.aygfsteel.com/itvincent/comments/commentRss/314417.htmlhttp://www.aygfsteel.com/itvincent/services/trackbacks/314417.html閱讀全文

itVincent 2010-03-03 16:11 發表評論
]]>
jQuery 1.4.2 發布http://www.aygfsteel.com/itvincent/archive/2010/02/23/313715.htmlitVincentitVincentTue, 23 Feb 2010 06:22:00 GMThttp://www.aygfsteel.com/itvincent/archive/2010/02/23/313715.htmlhttp://www.aygfsteel.com/itvincent/comments/313715.htmlhttp://www.aygfsteel.com/itvincent/archive/2010/02/23/313715.html#Feedback1http://www.aygfsteel.com/itvincent/comments/commentRss/313715.htmlhttp://www.aygfsteel.com/itvincent/services/trackbacks/313715.html新特性
加了兩個新方法: .delegate() 和.undelegate(). 是對.live() and .die() 的補充. 這兩個方法對特定的事件的監聽起到簡化。
  閱讀全文

itVincent 2010-02-23 14:22 發表評論
]]>
Ajax中文亂碼問題及解決方法http://www.aygfsteel.com/itvincent/archive/2009/03/16/260039.htmlitVincentitVincentMon, 16 Mar 2009 08:06:00 GMThttp://www.aygfsteel.com/itvincent/archive/2009/03/16/260039.htmlhttp://www.aygfsteel.com/itvincent/comments/260039.htmlhttp://www.aygfsteel.com/itvincent/archive/2009/03/16/260039.html#Feedback4http://www.aygfsteel.com/itvincent/comments/commentRss/260039.htmlhttp://www.aygfsteel.com/itvincent/services/trackbacks/260039.html場景:

使用jQuery的ajax方法提交ajax請求,代碼如下:
1$.ajax({
2    dataType : 'json'
3    ,type : 'POST'
4    ,url : 'http://localhost/test/test.do'
5    ,data : {id: 1, type: '商品'}
6    ,success : function(data){
7        
8    }

9}
);

問題:

提交后后臺action程序時,取到的type是亂碼

解決方法:

方法一:提交前采用encodeURI兩次編碼,記住一定是兩次
1.修改以下代碼
data:{id:1, type:encodeURI(encodeURI('商品'))}
2.在后臺action里要對取得的字符串進行decode
1String type = request.getParameter("type");
2type = URLDecoder.decode(type, "UTF-8");

方法二:ajax配置contentType屬性,加上charset=UTF-8
在ajax方法中加入以下參數
1contentType: "application/x-www-form-urlencoded; charset=UTF-8"
使用其它js框架或者xhr都是差不多,設置header中contentType即可,
這里關鍵是charset=UTF-8,如果沒有這個,是不行的,默認jQuery里的contentType是沒有的.
還補充一下jQuery里對參數已經進行了一次encodeURIComponent的處理

*方法二在action里不需要進行decode,所以推薦使用此方法




itVincent 2009-03-16 16:06 發表評論
]]>
Dojo筆記一http://www.aygfsteel.com/itvincent/archive/2006/12/07/86105.htmlitVincentitVincentThu, 07 Dec 2006 07:52:00 GMThttp://www.aygfsteel.com/itvincent/archive/2006/12/07/86105.htmlhttp://www.aygfsteel.com/itvincent/comments/86105.htmlhttp://www.aygfsteel.com/itvincent/archive/2006/12/07/86105.html#Feedback0http://www.aygfsteel.com/itvincent/comments/commentRss/86105.htmlhttp://www.aygfsteel.com/itvincent/services/trackbacks/86105.htmlDojo 是一個具有許多功能的豐富庫,包括:

  • 處理 html、字符串、樣式、dom、正則表達式和若干其他實用工具的通用庫。
  • 包括字典、ArraryLists、隊列、SortedList、設置和堆棧的數據結構。
  • 用于添加動畫效果、驗證、拖放和若干其他功能的可視化 Web 實用工具。
  • 數學和加密庫。
  • 存儲組件。
  • XML 解析

???它有個非常好用的widget庫,純凈html標簽,只須加入dojoType屬性,就可使原本的html標簽變成它自己的dojo widget。widget的CSS完全可自定制,掌握初步的使用方法,可參照test/widget目錄下的例子,如果要全面掌握所有參數,還是要自己看看src了,里面有一些注釋可以參照一下。

< button? dojoType ="Button" ?onclick ='dojo.debug("clicked? simple")' />



???dojo.io.bind實現了XMLHttpRequest里的大部分功能

dojo.io.bind( {
????????????url:?
" http://localhost:8080/test/test " ,
????????????load:?function(type,?data,?evt)
{?dojo.debug(data);?} ,
????????????mimetype:?
" text/plain "
????????}
);



???dojo.event.connect就如AOP機制那樣,動態將方法添加到對象上

1 dojo.event.connect(button,?'onClick',?'submitFunction');
2



???



itVincent 2006-12-07 15:52 發表評論
]]>
主站蜘蛛池模板: 彝良县| 盐亭县| 福海县| 改则县| 榆社县| 南投县| 中超| 定结县| 武威市| 永宁县| 南华县| 利津县| 望奎县| 苗栗市| 昌宁县| 芦溪县| 金门县| 新巴尔虎右旗| 阿荣旗| 济阳县| 图木舒克市| 乌兰浩特市| 泸水县| 公主岭市| 桓仁| 淮北市| 廉江市| 永和县| 丹江口市| 井陉县| 溧水县| 商城县| 定州市| 大洼县| 金门县| 镇江市| 横峰县| 涿鹿县| 乌兰察布市| 滦平县| 合作市|