linugb118--java space

          Java

          easiui2011110902

          //editor 綁定click事件
          var
          ed = $('#tt').datagrid('getEditor', { // get the editor object. index: 2, field: 'name' }); $(ed.target).bind('click', function(){ // bind the click event to editor target element. alert('clicked'); });
          //editor 綁定回車事件
           $('#ttt').datagrid('beginEdit', rowIndex);
          var ed = $('#ttt').datagrid('getEditors', rowIndex);
          for (var i = 0; i < ed.length; i++)
          {
          var e = ed[i];
          $(e.target).bind('keyup', function()
          {
          if (window.event.keyCode == 13)
          {
          alert("you check enter key");   
          }
          });
          }
          //editor綁定change 事件 
          function setEditing(tablename,rowIndex) {
                      var editors = $('#tt').datagrid('getEditors', rowIndex);
                      var priceEditor = editors[0];
                      var amountEditor = editors[1];
                      var sumcount = editors[2];
                      priceEditor.target.bind('change', function () {
                          //                calculate();
                          var sum = priceEditor.target.val() * amountEditor.target.val();
                          alert(sum);
                          sumcount.attr1.val(sum);
           
                      });
                      amountEditor.target.bind('change', function () {
                          var sum = priceEditor.target.val() + amountEditor.target.val();
                          alert(sum);

                      });

          posted on 2011-11-09 14:53 linugb118 閱讀(291) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
          博客園   IT新聞   Chat2DB   C++博客   博問  
           

          My Links

          Blog Stats

          常用鏈接

          留言簿(1)

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 南宫市| 清原| 凌云县| 清水河县| 江孜县| 墨竹工卡县| 罗定市| 泾阳县| 裕民县| 崇州市| 天等县| 汤阴县| 瓦房店市| 大名县| 万山特区| 那坡县| 嫩江县| 东丽区| 伊川县| 道真| 濮阳市| 奇台县| 正镶白旗| 嘉鱼县| 聂荣县| 佛学| 德安县| 浦县| 华宁县| 叶城县| 临城县| 道真| 浪卡子县| 格尔木市| 观塘区| 西青区| 林芝县| 县级市| 革吉县| 平乐县| 大安市|