点集贵州电脑网
 
 
 梦想之源 ›› 灌水专区 ›› 在T4中用JS修改TD的问题 版主:
灌水专区
新建论坛
申请免费TS
1 / 1 页
<< 1 >>
跳转
 主题:在T4中用JS修改TD的问题
 
 lele
发表时间:[2007-10-24 15:01:42] [向作者发站内短信] [复制链接告诉朋友]
等 级:列兵
经 验:498
性 别:帅哥
文 章:138
精 华:0


    <script>
           var flag=false;
           function update(id)
           {
            if(confirm("确认要修改阈值吗?"))
            {
              status.updateThreshold(id,threshold,updatex);
            }
           }  
           
           function updatex(data)
           {
             var e=document.getElementById("thresholdtable");
             for(var i=0;i<e.rows.length;i++)
             {
             var row=e.rows[i]; 
             if(row.id!=null && row.id!="" && row.id==data){
             e.deleteRow(i);
       i=i-1;
            }
           }
           }     
     </script>
 
</head>
<body>
    

 <table border="0" cellpadding="0" cellspacing="0" class="cTable">
   <tr>

  <td class="contentTable">

     <form jwcid="editThreshold">
            <table cellspacing="0" cellpadding="0" class="sTRD1" id=thresholdtable>
               <tr class="title">
                 <td>表达式名称</td>
                 <td>级别</td>
                 <td>单位</td>
                <td>比较符</td>
                 <td>值</td>
                 <td>选择</td>
      </tr>
      <tr  jwcid="alert_Threshold" onmouseover="this.style.backgroundColor='#E5F2FF'" onmouseout="this.style.backgroundColor='#FFFFE5'" bgcolor="#FFFFE5">    
        <td><span jwcid="alert_Threshold_expression"/></td>
           <td><span jwcid="alert_Threshold_level"/></td>
           <td><span jwcid="alert_Threshold_unit"/></td>
           <td><span jwcid="alert_Threshold_comparison_operators"/></td>
           <td><span id="ognl:Threshold.threshold" jwcid="alert_Threshold_threshold"/></td>
           <td><a href="#" jwcid="Alert_linkto_editThreshold" onclick="return false;">确认修改</a></td>                                         
      </tr>
    </table>
    </form>
     </div>
   </div>  
  </td>
  <td class="contentTableRight"></td>
   </tr>
 </table>  
    </div>    

 

</body>

 

 

 

</html>


table.JPG   10.0KB  点击下载
 楼主更多新贴 :  
灌水专区jfreechart图形上的链接
灌水专区itemselection的问题
灌水专区ognl:devicegroup.id
灌水专区foreach的问题
  楼1  
等 级:列兵
经 验:498
性 别:帅哥
文 章:138
精 华:0
 lele
发表时间:[2007-10-24 15:04:21] [向作者发站内短信] [复制链接告诉朋友]

   <script>
           var flag=false;
           function update(id)
           {
            if(confirm("确认要修改阈值吗?"))
            {
              status.updateThreshold(id,threshold,updatex);
            }
           }  
           
           function updatex(data)
           {
             var e=document.getElementById("thresholdtable");
             for(var i=0;i<e.rows.length;i++)
             {
             var row=e.rows[i]; 
             if(row.id!=null && row.id!="" && row.id==data){
             e.deleteRow(i);
       i=i-1;
            }
           }
           }     
     </script>

这里 我想             e.deleteRow(i); 这里 我想在获取到这个行对象只后 得到<td>值</td> 这个里面的文本框中的值 该怎么做啊

  楼2  
等 级:列兵
经 验:498
性 别:帅哥
文 章:138
精 华:0
 lele
发表时间:[2007-10-24 15:06:29] [向作者发站内短信] [复制链接告诉朋友]

<td><a href="#" jwcid="Alert_linkto_editThreshold" onclick="return false;">确认修改</a></td>       去要是想在这里调用 update这个函数  想达到threshold这个 这个就是上面说的TextField里的值 可以在     if(confirm("确认要修改阈值吗?"))
            {
              status.updateThreshold(id,threshold,updatex);
            } 这个个里面用JS 得到吗

  楼3  
等 级:下士
经 验:1683
性 别:帅哥
文 章:496
精 华:2
 干煸四季豆
发表时间:[2007-10-24 15:54:39] [向作者发站内短信] [复制链接告诉朋友]

看了半天,大概明白了。你是想去<TD>标签之间的值,和input type=text的值。

给TD和input type=text分别定义一个ID。

var tdValue = document.getElementById("tdID").innerText;

var textValue= document.getElementById("inputId").value;

1 / 1 页
<< 1 >>
跳转
  快速回复
  帐号: 密码: 匿名不登陆
回复内容:  
验 证 码:
 
 
·VIP收费TS,您明智的选择!
·9800GT+19'液晶DIY仅售3500元
·双核特惠:1999、2999、3999
·什么是点金积分,如何查看自
·团购一期:三星R458-DS0G+高
  
贵州点集科技发展有限责任公司·点集贵州电脑网 版权所有©2006-2008
中华人民共和国增值电信业务经营许可证 黔B-20070010号
客服QQ: 93804809818866281927205370
电子邮件: deangi@vip.sina.com
技术支持: 0851-5109268