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 閱讀(292) 評論(0)  編輯  收藏


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


          網(wǎng)站導航:
           

          My Links

          Blog Stats

          常用鏈接

          留言簿(1)

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 苍山县| 阳朔县| 浑源县| 南汇区| 灵丘县| 漳平市| 石屏县| 尼勒克县| 故城县| 抚松县| 沧源| 宜良县| 西峡县| 石狮市| 禄劝| 利辛县| 绥化市| 堆龙德庆县| 比如县| 阜城县| 蒙城县| 凤庆县| 河西区| 闽清县| 进贤县| 澄城县| 清水县| 庄河市| 七台河市| 洞口县| 竹溪县| 万宁市| 信阳市| 利辛县| 高碑店市| 遵化市| 遂宁市| 新干县| 乌兰察布市| 宁河县| 镇康县|