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)  編輯  收藏


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


          網站導航:
           

          My Links

          Blog Stats

          常用鏈接

          留言簿(1)

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 郑州市| 乃东县| 治县。| 龙胜| 沽源县| 肃北| 确山县| 恭城| 壤塘县| 克拉玛依市| 子洲县| 富锦市| 阿拉尔市| 寿宁县| 石狮市| 鄱阳县| 会昌县| 延寿县| 墨脱县| 金秀| 克拉玛依市| 安远县| 永川市| 佛山市| 德庆县| 勃利县| 灵寿县| 新津县| 建宁县| 湘西| 海门市| 永寿县| 曲沃县| 南部县| 库尔勒市| 邹平县| 泽州县| 沈阳市| 湖南省| 延川县| 甘肃省|