欧美国产小视频,亚洲电影在线观看,欧美亚洲精品一区http://www.aygfsteel.com/wangbing/category/42628.html本處文章除注明“轉載”外均為原創,轉載請注明出處。 zh-cnWed, 21 Mar 2012 06:07:49 GMTWed, 21 Mar 2012 06:07:49 GMT60json和javascript的關系http://www.aygfsteel.com/wangbing/archive/2012/03/20/372313.htmlwangchangbingwangchangbingTue, 20 Mar 2012 13:19:00 GMThttp://www.aygfsteel.com/wangbing/archive/2012/03/20/372313.htmlhttp://www.aygfsteel.com/wangbing/comments/372313.htmlhttp://www.aygfsteel.com/wangbing/archive/2012/03/20/372313.html#Feedback0http://www.aygfsteel.com/wangbing/comments/commentRss/372313.htmlhttp://www.aygfsteel.com/wangbing/services/trackbacks/372313.html參考json網站: http://www.json.org/json-zh.html 

JSON
(JavaScript Object Notation) 是一種輕量級的數據交換格式。 易于人閱讀和編寫。同時也易于機器解析和生成。 它基于JavaScript Programming Language,Standard ECMA-262 3rd Edition - December 1999的一個子集。 JSON采用完全獨立于語言的文本格式,但是也使用了類似于C語言家族的習慣(包括C, C++, C#, Java, JavaScript, Perl, Python等)。 這些特性使JSON成為理想的數據交換語言。 

wangchangbing 2012-03-20 21:19 發表評論
]]>
treepanel開發遇到的問題整理http://www.aygfsteel.com/wangbing/archive/2009/11/22/303267.htmlwangchangbingwangchangbingSun, 22 Nov 2009 15:03:00 GMThttp://www.aygfsteel.com/wangbing/archive/2009/11/22/303267.htmlhttp://www.aygfsteel.com/wangbing/comments/303267.htmlhttp://www.aygfsteel.com/wangbing/archive/2009/11/22/303267.html#Feedback0http://www.aygfsteel.com/wangbing/comments/commentRss/303267.htmlhttp://www.aygfsteel.com/wangbing/services/trackbacks/303267.html   有朋友指出我的DOM采用了IMG和部分的DIV組成,這種方式顯示速度很慢。針對這個問題,其實我還不是很擔心,可能對于以后的網絡,或者說我開發的UI主要用于內網使用,目前還不擔心網絡問題,HTML的解析展示比較深,不是很好解決的。

2、對于節點的delete和add操作
  在對tree的delete和add進行開發過程中遇到了麻煩。其實,對于treepanel對象,內部有一個array存放著樹形結構的節點數據,另外,在DOM上面也存在著節點數據。這2種數據有部分是冗余的,有冗余就會有同步的問題。對于add和delete操作,最簡單的做法是,對array的數據進行更新,然后利用reload刷新樹。這樣可以達到add和delete的效果。這樣其實回避了一個問題,哪就是對單個的節點進行插入時對DOM進行的局部更新操作。

3、關于異步加載
  異步加載是個好東西,但是開發過程中問題較多。和上面的delete和add情況類似,如果采用加載到本地然后reload的話,異步的意義就不大了。必須采用對節點進行更加“精細”的操作。

  基于上面3個問題,發現制約開發的問題歸結到了DOM的定義上了。因為,不合理的DOM結構導致對單個節點的操作很麻煩,很不方便。需要采用國家合理的DOM結構以支持更加復雜的操作和功能。

wangchangbing 2009-11-22 23:03 發表評論
]]>
另一個基于jquery的樹插件http://www.aygfsteel.com/wangbing/archive/2009/11/20/302998.htmlwangchangbingwangchangbingThu, 19 Nov 2009 16:36:00 GMThttp://www.aygfsteel.com/wangbing/archive/2009/11/20/302998.htmlhttp://www.aygfsteel.com/wangbing/comments/302998.htmlhttp://www.aygfsteel.com/wangbing/archive/2009/11/20/302998.html#Feedback24http://www.aygfsteel.com/wangbing/comments/commentRss/302998.htmlhttp://www.aygfsteel.com/wangbing/services/trackbacks/302998.html
  我不是很會整理文檔,直接貼圖上代碼了。

  google的實例地址:http://wangchangbing.appspot.com/examples/tree/demo_checkbox.html

  具體的代碼如果需要可以留email給我。這個treepanel目前只能是學習的目的,功能還沒有開發完。另外,還有一個tabpanel,功能基本開發完成,但是也還是需要完善,均屬于學習產物。

  來個圖:




wangchangbing 2009-11-20 00:36 發表評論
]]>
[轉]jQuery.extend函數詳細用法http://www.aygfsteel.com/wangbing/archive/2009/11/05/301243.htmlwangchangbingwangchangbingThu, 05 Nov 2009 03:54:00 GMThttp://www.aygfsteel.com/wangbing/archive/2009/11/05/301243.htmlhttp://www.aygfsteel.com/wangbing/comments/301243.htmlhttp://www.aygfsteel.com/wangbing/archive/2009/11/05/301243.html#Feedback0http://www.aygfsteel.com/wangbing/comments/commentRss/301243.htmlhttp://www.aygfsteel.com/wangbing/services/trackbacks/301243.html

jQuery.extend函數詳細用法
最近在研究jQuery。把jQuery.extend擴展函數的用法記錄下來。

1、擴展jQuery靜態方法.

1$.extend({
2test:function(){alert('test函數')}
3})
用法: $.test()


2、合并多個對象.
為jQuery.extend(css1,css2)為例,css1,css2個有一些屬性(法照樣會比處理,這里之講屬性).
extend函數會把css2有而css2沒有的屬性加到css1中,如果css2的某個屬性與css1的某個屬性名稱享用,就會用css2的屬性去覆蓋css1的同名屬性。css1就是最后的整和對象。或者也可以用 :
var newcss = jquery.extend(css1,css2)  newcss就是合并的新對象。
var newcss = jquery.extend({},css1,css2) newcss就是合并的新對象.而且沒有破壞css1的結構。

1//用法: jQuery.extend(obj1,obj2,obj3,..)
2var Css1={size: "10px",style: "oblique"}
3var Css2={size: "12px",style: "oblique",weight: "bolder"}
4$.jQuery.extend(Css1,Css2)
5//結果:Css1的size屬性被覆蓋,而且繼承了Css2的weight屬性
6// Css1 = {size: "12px",style: "oblique",weight: "bolder"}
7

3。深度鑲套對象
新的extend()允許你更深度的合并鑲套對象。下面的例子是一個很好的證明。
1// 以前的 .extend()   
2   jQuery.extend(   
3     { name: “John”, location: { city: “Boston” } },   
4     { last: “Resig”, location: { state: “MA” } }   
5   );   
6    // 結果:   
7    // => { name: “John”, last: “Resig”, location: { state: “MA” } }
8  // 新的更深入的 .extend()   
9   jQuery.extend( true,   
10   { name: “John”, location: { city: “Boston” } },   
11     { last: “Resig”, location: { state: “MA” } }   
12  );   
13  // 結果   
14   // => { name: “John”, last: “Resig”,   
15  //      location: { city: “Boston”, state: “MA” } }  
16

本篇文章來源于PHP論壇 文章地址:http://bbs.php.cn/thread-33593-1-4.html



wangchangbing 2009-11-05 11:54 發表評論
]]>
jquery.flot.js使用筆記http://www.aygfsteel.com/wangbing/archive/2009/10/29/300280.htmlwangchangbingwangchangbingThu, 29 Oct 2009 14:54:00 GMThttp://www.aygfsteel.com/wangbing/archive/2009/10/29/300280.htmlhttp://www.aygfsteel.com/wangbing/comments/300280.htmlhttp://www.aygfsteel.com/wangbing/archive/2009/10/29/300280.html#Feedback0http://www.aygfsteel.com/wangbing/comments/commentRss/300280.htmlhttp://www.aygfsteel.com/wangbing/services/trackbacks/300280.html   1、輸出一條或者多條曲線圖表,同時可以利用腳本控制顯示的條數。
  2、可以對圖標進行select,然后對選擇的區域進行zoom操作。
  3、支持x軸使用time模式,可以將序列設置為Date.parse(new Date())的數值,結合select功能可以更好的進行zoom控制。
  4、支持2種特定的事件:placeholder和plotclick,可以在鼠標移動到point和單擊point時進行操作。
  ......

  我研究不是很深入,想做一個提示框功能,鼠標移動到point上時提示信息。但是flot沒有支持相關的接口,我只能自己寫了一個div,整體搭配效果馬上就差了很多。總的來說,這個插件還是很不錯,包括速度也不錯,基本夠用。

wangchangbing 2009-10-29 22:54 發表評論
]]>
jqGrid試用日記http://www.aygfsteel.com/wangbing/archive/2009/03/20/261058.htmlwangchangbingwangchangbingFri, 20 Mar 2009 07:56:00 GMThttp://www.aygfsteel.com/wangbing/archive/2009/03/20/261058.htmlhttp://www.aygfsteel.com/wangbing/comments/261058.htmlhttp://www.aygfsteel.com/wangbing/archive/2009/03/20/261058.html#Feedback3http://www.aygfsteel.com/wangbing/comments/commentRss/261058.htmlhttp://www.aygfsteel.com/wangbing/services/trackbacks/261058.html 主要的代碼如下:
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<html>
<head>
<%@ include file="/commons/meta.jsp" %>
<title>User Manage</title>

<link rel="stylesheet" type="text/css" media="screen" href="<c:url value="/scripts/styles/jqGrid/themes/basic/grid.css"/>" />
<link rel="stylesheet" type="text/css" media="screen" href="<c:url value="/scripts/styles/jqGrid/themes/jqModal.css"/>" />

<script src="<c:url value="/scripts/plugIn/jqGrid/jquery.jqGrid.js"/>" type="text/javascript"></script>
<script src=
"<c:url value="/scripts/plugIn/jqGrid/jqModal.js"/>" type="text/javascript"></script>
<script src=
"<c:url value="/scripts/plugIn/jqGrid/jqDnR.js"/>" type="text/javascript"></script>
<script src=
"<c:url value="/scripts/plugIn/corner/jquery.corner.js"/>" type="text/javascript"></script>
          

</head>
<script type=
"text/javascript">


jQuery(document).ready(function(){ 
    //var _documentWidth = $(document.body).innerWidth();
    //alert('_documentWidth2=>'+_documentWidth);
    
  jQuery(
"#list").jqGrid({
    url:'${ctx}/module/yhqxgl/userinfo/data-xmlmap.xml',
    datatype: 'xml',
    mtype: 'GET',
    xmlReader: { 
          root:
"result"
          row:
"invoice"
          page:
"invoices>currentpage"
          total:
"invoices>totalpages"
          records:
"invoices>totalrecords"
          repeatitems:false, 
          id:
"asin"
    },
    colNames:['Inv No','Date', 'Amount','Tax','Total','Notes'],
      colModel :[ 
                 {name:'invid', index:'invid', width:55, xmlmap:
"invoiceno"}, 
                 {name:'invdate', index:'invdate', width:90, xmlmap:
"invoicedate"}, 
                 {name:'amount', index:'amount', width:80, align:'right', xmlmap:
"invoiceamount"}, 
                 {name:'tax', index:'tax', width:80, align:'right', xmlmap:
"invoicetax"}, 
                 {name:'total', index:'total', width:80, align:'right', xmlmap:
"invoicetotal"}, 
                 {name:'note', index:'note', width:150, sortable:false, xmlmap:
"notes"
     ],  
    pager: jQuery('#pager'),
    rowNum:10,
    rowList:[10,20,30],
    sortname: 'invid',
    sortorder: 
"desc",
    viewrecords: true,
      multiselect: true,
  //multikey: 'ctrlKey', //不設置這個值時可以連續的選中記錄
       multiboxonly :true,
    width:800,
    height: 'auto', 
    hidegrid: false, 
    imgpath: '${ctx}/scripts/styles/jqGrid/themes/basic/images',
    caption: 'My first grid',
    loadError : function(xhr,st,err) { 
        $(
"#tblMasterMessage").html("Type: "+st+"; Response: "+ xhr.status + " "+xhr.statusText);
    },
    ondblClickRow : function(rowid) { 
        //$(
"#tblDetails").editGridRow(rowid,editdtprm);
        alert('ondblClickRow rowid=>'+rowid);
    },
    onRightClickRow :  function(rowid){
        alert('onRightClickRow rowid=>'+rowid);
    },
    onSelectRow :  function(rowid){
        alert('onSelectRow rowid=>'+rowid);
    },
    onSortCol : function(index, colindex, sortorder){
        alert('onSortCol index=>'+index +
" colindex=>"+colindex +"  sortorder=>"+sortorder);
    }
  }); 


  //block-query
  $(
"#queryForm").corner("bevel 8px")
  
});

 

</script>
<body>
    <div id=
"queryForm"  style="height:200px;width:100px;background-color:red"></div>

    <table id=
"list" class="scroll" width="100%"></table> 
    <div id=
"pager" class="scroll" style="text-align:center;"></div> 
    <div id=
"tblMasterMessage"></div>

</body>
</html>


其中,
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="Cache-Control" content="no-store"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="0"/>

<script>
var _contextPath = '${ctx}';
</script>

<script src="<c:url value="/scripts/jquery/jquery.js"/>" type="text/javascript"></script>
<link href=
"<c:url value="/scripts/styles/default.css"/>" type="text/css" rel="stylesheet">

其中,

function jqGridInclude()
{
   
// var pathtojsfiles = "/greatwall/scripts/plugIn/jqGrid/"; // need to be ajusted 
    var pathtojsfiles = _contextPath + "/scripts/plugIn/jqGrid/";
    
    
// set include to false if you do not want some modules to be included
    var combineIntoOne = false;
    
var combinedInclude = new Array();
    
var combinedIncludeURL = "combine.php?type=javascript&files=";
    
var minver = true;
    
var modules = [
        { include: 
true, incfile:'grid.locale-en.js',minfile: 'min/grid.locale-en-min.js'}, // jqGrid translation
        { include: true, incfile:'grid.base.js',minfile: 'min/grid.base-min.js'}, // jqGrid base
        { include: true, incfile:'grid.common.js',minfile: 'min/grid.common-min.js' }, // jqGrid common for editing
        { include: true, incfile:'grid.formedit.js',minfile: 'min/grid.formedit-min.js' }, // jqGrid Form editing
        { include: true, incfile:'grid.inlinedit.js',minfile: 'min/grid.inlinedit-min.js' }, // jqGrid inline editing
        { include: true, incfile:'grid.celledit.js',minfile: 'min/grid.celledit-min.js' }, // jqGrid cell editing
        { include: true, incfile:'grid.subgrid.js',minfile: 'min/grid.subgrid-min.js'}, //jqGrid subgrid
        { include: true, incfile:'grid.treegrid.js',minfile: 'min/grid.treegrid-min.js'}, //jqGrid treegrid
        { include: true, incfile:'grid.custom.js',minfile: 'min/grid.custom-min.js'}, //jqGrid custom 
        { include: true, incfile:'grid.postext.js',minfile: 'min/grid.postext-min.js'}, //jqGrid postext
        { include: true, incfile:'grid.tbltogrid.js',minfile: 'min/grid.tbltogrid-min.js'}, //jqGrid table to grid 
        { include: true, incfile:'grid.setcolumns.js',minfile: 'min/grid.setcolumns-min.js'} //jqGrid setcolumns
    ];
    
var filename;
    
for(var i=0;i<modules.length; i++)
    {
        
if(modules[i].include === true) {
            
            
if (minver == true
                filename 
= pathtojsfiles+modules[i].incfile;
            
else 
                filename 
= pathtojsfiles+modules[i].minfile;
            
            
if (combineIntoOne !== true) {
                IncludeJavaScript(filename);
            } 
else {
                combinedInclude[combinedInclude.length] 
= filename;
            }
        }
    }
    
if ((combineIntoOne === true&& (combinedInclude.length>0) ) {
        
var fileList = implode(",",combinedInclude);
        IncludeJavaScript(combinedIncludeURL
+fileList);
    }
    
function implode( glue, pieces ) {
    
// http://kevin.vanzonneveld.net
    //original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    //example 1: implode(' ', ['Kevin', 'van', 'Zonneveld']);
    //returns 1: 'Kevin van Zonneveld'
        return ( ( pieces instanceof Array ) ? pieces.join ( glue ) : pieces );
    };
    
    
function IncludeJavaScript(jsFile)
    {
        
var oHead = document.getElementsByTagName('head')[0];
        
var oScript = document.createElement('script');
        oScript.type 
= 'text/javascript';
        oScript.src 
= jsFile;
        oHead.appendChild(oScript);        
    };
};

jqGridInclude();



wangchangbing 2009-03-20 15:56 發表評論
]]>
jQuery插件收集http://www.aygfsteel.com/wangbing/archive/2009/03/18/260452.htmlwangchangbingwangchangbingWed, 18 Mar 2009 04:42:00 GMThttp://www.aygfsteel.com/wangbing/archive/2009/03/18/260452.htmlhttp://www.aygfsteel.com/wangbing/comments/260452.htmlhttp://www.aygfsteel.com/wangbing/archive/2009/03/18/260452.html#Feedback2http://www.aygfsteel.com/wangbing/comments/commentRss/260452.htmlhttp://www.aygfsteel.com/wangbing/services/trackbacks/260452.htmlhttp://methvin.com/jquery/splitter/3csplitter.html  這個是一個layout的插件,不過比較簡陋

wangchangbing 2009-03-18 12:42 發表評論
]]>
主站蜘蛛池模板: 霍邱县| 婺源县| 天祝| 海南省| 光山县| 恭城| 水富县| 西充县| 子长县| 喜德县| 许昌县| 比如县| 大姚县| 广丰县| 明光市| 神木县| 岱山县| 民和| 南昌市| 北宁市| 民权县| 镇雄县| 赤峰市| 星子县| 保康县| 和硕县| 区。| 浮山县| 淳安县| 阳谷县| 永福县| 大冶市| 保靖县| 云霄县| 岱山县| 无极县| 平罗县| 佛冈县| 宝丰县| 高清| 沙雅县|