客户端读取datagrid单元格数据(编辑状态)的问题? 上面的是客户端源文件中显示的内容。下面的是在javascript中可以得到的数据-》Row.cells[3].innerHTML 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 读取name为GridWDZL:_ctl3:_ctl0的文本框的值:function get(){var s=document.getElementsByName ('GridWDZL:_ctl3:_ctl0')[0];if(s==null||typeof(s)=='undefined'){ alert('找不到元素');}else{ alert(s.value)}} to vivianfdlpw() document.getElementsByName ('GridWDZL:_ctl3:_ctl0')[0]的值为undefined在document.getElementsByName ('GridWDZL:_ctl3:_ctl0').outerHTML中有我要的value值 太多了<TD id="TDGridWDZL" valign="top" width="100%" colspan="8" height="100%"><table cellspacing="0" rules="all" border="1" id="GridWDZL" style="height:200px;width:100%;border-collapse:collapse;position:none;WORD-BREAK:break-all;WORD-WRAP:break-word;TABLE-LAYOUT:fixed;"><thead> <tr class="tablehead" style="height:22px;"> <td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:10%;">序号</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:0px;">BZGXWDID</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:0px;">BZJXGXID</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:40%;">文档名称</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:20%;">文档类型</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:10%;">编写人</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:20%;">提交时间</td> </tr></thead><tbody><tr class="tablebody" onclick="javascript:return select(this,'0','WDZL');" ondblclick="__doPostBack('GridWDZL:_ctl3','Edit')" style="height:22px;">=====================================这里了= <td>1</td><td>cbcdd896fc854c2494110c1814aced2b</td><td>25023C58BCA04DC9AA2D8B06AB59D165</td><td><input name="GridWDZL:_ctl3:_ctl0" type="text" style="background-color:PowderBlue;border-style:None;width:100%;" /></td><td>image/pjpeg</td><td><input name="GridWDZL:_ctl3:_ctl1" type="text" style="background-color:PowderBlue;border-style:None;width:100%;" /></td><td><input name="GridWDZL:_ctl3:_ctl2" type="text" value="2005-2-14 0:00:00" onclick="setday(this,this,'yyyy-mm-dd')" style="background-color:PowderBlue;border-style:None;width:100%;" /></td>====================================== </tr><tr class="tablebody2" onclick="javascript:return select(this,'1','WDZL');" ondblclick="__doPostBack('GridWDZL:_ctl4','Edit')" style="height:22px;"> <td>2</td><td>c768a32f544444f894d7ca4c8bedab31</td><td>25023C58BCA04DC9AA2D8B06AB59D165</td><td> </td><td> </td><td> </td><td> </td> </tr><tr align="Center" valign="Middle" style="font-size:9pt;height:22px;"> <td colspan="7" style="height:23px;"><a id="GridWDZL__ctl6_lbFirst" disabled="disabled">首页</a> <a id="GridWDZL__ctl6_lbPrve" disabled="disabled">上一页</a> <a id="GridWDZL__ctl6_lbNext" disabled="disabled">下一页</a> <a id="GridWDZL__ctl6_lbLast" disabled="disabled">末页</a> <span id="GridWDZL__ctl6_lblCurPage">【第1页</span><span id="GridWDZL__ctl6_lblPageCount">/共1页】</span> <span id="GridWDZL__ctl6_lblRowCount">【共2条】</span> <input name="GridWDZL:_ctl6:tbGoPage" type="text" id="GridWDZL__ctl6_tbGoPage" disabled="disabled" style="font-family:宋体;font-size:9pt;height:20px;width:40px;" /> <input type="submit" name="GridWDZL:_ctl6:btnGo" value="转到" id="GridWDZL__ctl6_btnGo" disabled="disabled" style="font-family:宋体;font-size:9pt;height:22px;width:40px;" /> </td> </tr><tr style='height:auto;'><td colspan=7 style='BORDER-BOTTOM: thin solid'></td></tr></tbody><tfoot></tfoot></table><script language=javascript>function DG_moveOnTH(td) { if(event.offsetX > td.offsetWidth - 6 || event.offsetX < 6) td.style.cursor = 'w-resize'; else td.style.cursor = 'default'; if(td.mouseDown==true) { if (event.offsetX < 6) { td2 = td.previousSibling; offset = event.x - td2.oldX; td2.width = td2.oldWidth + offset; td2.style.width = td2.width; table=td; while(table.tagName != 'TABLE') {table = table.parentElement;} table.width = td2.tableWidth+offset; table.style.width = table.width; } else { offset = event.x - td.oldX; td.width = td.oldWidth + offset; td.style.width = td.width; td.style.cursor = 'w-resize'; table=td; while(table.tagName != 'TABLE') table = table.parentElement; table.width = td.tableWidth+offset; table.style.width = table.width; } } } function DG_downOnTH(td) { if(event.offsetX > td.offsetWidth - 6) { td.mouseDown = true; td.oldX = event.x; td.oldWidth = td.offsetWidth; table = td; while(table.tagName != 'TABLE') table = table.parentElement; td.tableWidth = table.offsetWidth; } else if(event.offsetX < 6) { td2 = td.previousSibling; td.mouseDown = true; td2.oldX = event.x; td2.oldWidth = td2.offsetWidth; table = td2; while(table.tagName != 'TABLE') table = table.parentElement; td2.tableWidth = table.offsetWidth; } else td.mouseDown = false; }</script></TD> 下面的代码测试可以的:<style>input{t:expression(this.ondblclick=function(){get()})}</style><table><tr><TD id="TDGridWDZL" valign="top" width="100%" colspan="8" height="100%"><table cellspacing="0" rules="all" border="1" id="GridWDZL" style="height:200px;width:100%;border-collapse:collapse;position:none;WORD-BREAK:break-all;WORD-WRAP:break-word;TABLE-LAYOUT:fixed;"><thead> <tr class="tablehead" style="height:22px;"> <td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:10%;">序号</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:0px;">BZGXWDID</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:0px;">BZJXGXID</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:40%;">文档名称</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:20%;">文档类型</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:10%;">编写人</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:20%;">提交时间</td> </tr></thead><tbody><tr class="tablebody" onclick="javascript:return select(this,'0','WDZL');" ondblclick="__doPostBack('GridWDZL:_ctl3','Edit')" style="height:22px;"><td>1</td><td>cbcdd896fc854c2494110c1814aced2b</td><td>25023C58BCA04DC9AA2D8B06AB59D165</td><td><input name="GridWDZL:_ctl3:_ctl0" type="text" style="background-color:PowderBlue;border-style:None;width:100%;" /></td><td>image/pjpeg</td><td><input name="GridWDZL:_ctl3:_ctl1" type="text" style="background-color:PowderBlue;border-style:None;width:100%;" /></td><td><input name="GridWDZL:_ctl3:_ctl2" type="text" value="2005-2-14 0:00:00" onclick="setday(this,this,'yyyy-mm-dd')" style="background-color:PowderBlue;border-style:None;width:100%;" /></td>====================================== </tr><tr class="tablebody2" onclick="javascript:return select(this,'1','WDZL');" ondblclick="__doPostBack('GridWDZL:_ctl4','Edit')" style="height:22px;"> <td>2</td><td>c768a32f544444f894d7ca4c8bedab31</td><td>25023C58BCA04DC9AA2D8B06AB59D165</td><td> </td><td> </td><td> </td><td> </td> </tr><tr align="Center" valign="Middle" style="font-size:9pt;height:22px;"> <td colspan="7" style="height:23px;"><a id="GridWDZL__ctl6_lbFirst" disabled="disabled">首页</a> <a id="GridWDZL__ctl6_lbPrve" disabled="disabled">上一页</a> <a id="GridWDZL__ctl6_lbNext" disabled="disabled">下一页</a> <a id="GridWDZL__ctl6_lbLast" disabled="disabled">末页</a> <span id="GridWDZL__ctl6_lblCurPage">【第1页</span><span id="GridWDZL__ctl6_lblPageCount">/共1页】</span> <span id="GridWDZL__ctl6_lblRowCount">【共2条】</span> <input name="GridWDZL:_ctl6:tbGoPage" type="text" id="GridWDZL__ctl6_tbGoPage" disabled="disabled" style="font-family:宋体;font-size:9pt;height:20px;width:40px;" /> <input type="submit" name="GridWDZL:_ctl6:btnGo" value="转到" id="GridWDZL__ctl6_btnGo" disabled="disabled" style="font-family:宋体;font-size:9pt;height:22px;width:40px;" /> </td> </tr><tr style='height:auto;'><td colspan=7 style='BORDER-BOTTOM: thin solid'></td></tr></tbody><tfoot></tfoot></table><script language=javascript>function DG_moveOnTH(td) { if(event.offsetX > td.offsetWidth - 6 || event.offsetX < 6) td.style.cursor = 'w-resize'; else td.style.cursor = 'default'; if(td.mouseDown==true) { if (event.offsetX < 6) { td2 = td.previousSibling; offset = event.x - td2.oldX; td2.width = td2.oldWidth + offset; td2.style.width = td2.width; table=td; while(table.tagName != 'TABLE') {table = table.parentElement;} table.width = td2.tableWidth+offset; table.style.width = table.width; } else { offset = event.x - td.oldX; td.width = td.oldWidth + offset; td.style.width = td.width; td.style.cursor = 'w-resize'; table=td; while(table.tagName != 'TABLE') table = table.parentElement; table.width = td.tableWidth+offset; table.style.width = table.width; } } } function DG_downOnTH(td) { if(event.offsetX > td.offsetWidth - 6) { td.mouseDown = true; td.oldX = event.x; td.oldWidth = td.offsetWidth; table = td; while(table.tagName != 'TABLE') table = table.parentElement; td.tableWidth = table.offsetWidth; } else if(event.offsetX < 6) { td2 = td.previousSibling; td.mouseDown = true; td2.oldX = event.x; td2.oldWidth = td2.offsetWidth; table = td2; while(table.tagName != 'TABLE') table = table.parentElement; td2.tableWidth = table.offsetWidth; } else td.mouseDown = false; }</script></TD></tr></table><script>function get(){var s=document.getElementsByName ('GridWDZL:_ctl3:_ctl0')[0];if(s==null||typeof(s)=='undefined'){ alert('找不到元素');}else{ alert(s.value)}}</script> 为什么ie8的fadeIn失效 请教一个简单的js问题。 如何多个dom设置同一属性? js增加网页控件 如何选择并复制iframe 子页面中的内容 你们肯定不知道这段代码为什么能执行 我要明白就进来瞅瞅. 伤心.谁能告诉我为什么? 关于提交的问题?(在线等) 要使用三个异步方法,怎么确定这三个调用的顺序? 问个JS的问题 怎么才可以弹出2个新窗口 我只会弹1个 使用过js向flash里面传参数的朋友请进来。问题解决立刻结帖。
function get()
{
var s=document.getElementsByName ('GridWDZL:_ctl3:_ctl0')[0];
if(s==null||typeof(s)=='undefined')
{
alert('找不到元素');
}
else
{
alert(s.value)
}
}
document.getElementsByName ('GridWDZL:_ctl3:_ctl0')[0]的值为undefined
在document.getElementsByName ('GridWDZL:_ctl3:_ctl0').outerHTML中有我要的value值
<TD id="TDGridWDZL" valign="top" width="100%" colspan="8" height="100%"><table cellspacing="0" rules="all" border="1" id="GridWDZL" style="height:200px;width:100%;border-collapse:collapse;position:none;WORD-BREAK:break-all;WORD-WRAP:break-word;TABLE-LAYOUT:fixed;"><thead>
<tr class="tablehead" style="height:22px;">
<td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:10%;">序号</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:0px;">BZGXWDID</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:0px;">BZJXGXID</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:40%;">文档名称</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:20%;">文档类型</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:10%;">编写人</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:20%;">提交时间</td>
</tr></thead><tbody><tr class="tablebody" onclick="javascript:return select(this,'0','WDZL');" ondblclick="__doPostBack('GridWDZL:_ctl3','Edit')" style="height:22px;">
=====================================这里了= <td>1</td><td>cbcdd896fc854c2494110c1814aced2b</td><td>25023C58BCA04DC9AA2D8B06AB59D165</td><td><input name="GridWDZL:_ctl3:_ctl0" type="text" style="background-color:PowderBlue;border-style:None;width:100%;" /></td><td>image/pjpeg</td><td><input name="GridWDZL:_ctl3:_ctl1" type="text" style="background-color:PowderBlue;border-style:None;width:100%;" /></td><td><input name="GridWDZL:_ctl3:_ctl2" type="text" value="2005-2-14 0:00:00" onclick="setday(this,this,'yyyy-mm-dd')" style="background-color:PowderBlue;border-style:None;width:100%;" /></td>
======================================
</tr><tr class="tablebody2" onclick="javascript:return select(this,'1','WDZL');" ondblclick="__doPostBack('GridWDZL:_ctl4','Edit')" style="height:22px;">
<td>2</td><td>c768a32f544444f894d7ca4c8bedab31</td><td>25023C58BCA04DC9AA2D8B06AB59D165</td><td> </td><td> </td><td> </td><td> </td>
</tr><tr align="Center" valign="Middle" style="font-size:9pt;height:22px;">
<td colspan="7" style="height:23px;"><a id="GridWDZL__ctl6_lbFirst" disabled="disabled">首页</a> <a id="GridWDZL__ctl6_lbPrve" disabled="disabled">上一页</a> <a id="GridWDZL__ctl6_lbNext" disabled="disabled">下一页</a> <a id="GridWDZL__ctl6_lbLast" disabled="disabled">末页</a> <span id="GridWDZL__ctl6_lblCurPage">【第1页</span><span id="GridWDZL__ctl6_lblPageCount">/共1页】</span> <span id="GridWDZL__ctl6_lblRowCount">【共2条】</span> <input name="GridWDZL:_ctl6:tbGoPage" type="text" id="GridWDZL__ctl6_tbGoPage" disabled="disabled" style="font-family:宋体;font-size:9pt;height:20px;width:40px;" /> <input type="submit" name="GridWDZL:_ctl6:btnGo" value="转到" id="GridWDZL__ctl6_btnGo" disabled="disabled" style="font-family:宋体;font-size:9pt;height:22px;width:40px;" /> </td>
</tr>
<tr style='height:auto;'><td colspan=7 style='BORDER-BOTTOM: thin solid'></td></tr></tbody><tfoot></tfoot></table><script language=javascript>function DG_moveOnTH(td)
{
if(event.offsetX > td.offsetWidth - 6 || event.offsetX < 6)
td.style.cursor = 'w-resize';
else
td.style.cursor = 'default';
if(td.mouseDown==true)
{
if (event.offsetX < 6)
{
td2 = td.previousSibling;
offset = event.x - td2.oldX;
td2.width = td2.oldWidth + offset;
td2.style.width = td2.width;
table=td;
while(table.tagName != 'TABLE') {table = table.parentElement;}
table.width = td2.tableWidth+offset;
table.style.width = table.width;
}
else
{
offset = event.x - td.oldX;
td.width = td.oldWidth + offset;
td.style.width = td.width;
td.style.cursor = 'w-resize';
table=td;
while(table.tagName != 'TABLE') table = table.parentElement;
table.width = td.tableWidth+offset;
table.style.width = table.width;
}
}
}
function DG_downOnTH(td)
{
if(event.offsetX > td.offsetWidth - 6)
{
td.mouseDown = true;
td.oldX = event.x;
td.oldWidth = td.offsetWidth;
table = td;
while(table.tagName != 'TABLE') table = table.parentElement;
td.tableWidth = table.offsetWidth;
}
else if(event.offsetX < 6)
{
td2 = td.previousSibling;
td.mouseDown = true;
td2.oldX = event.x;
td2.oldWidth = td2.offsetWidth;
table = td2;
while(table.tagName != 'TABLE') table = table.parentElement;
td2.tableWidth = table.offsetWidth;
}
else
td.mouseDown = false;
}</script></TD>
input{t:expression(this.ondblclick=function(){get()})}
</style>
<table><tr>
<TD id="TDGridWDZL" valign="top" width="100%" colspan="8" height="100%"><table cellspacing="0" rules="all" border="1" id="GridWDZL" style="height:200px;width:100%;border-collapse:collapse;position:none;WORD-BREAK:break-all;WORD-WRAP:break-word;TABLE-LAYOUT:fixed;"><thead>
<tr class="tablehead" style="height:22px;">
<td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:10%;">序号</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:0px;">BZGXWDID</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:0px;">BZJXGXID</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:40%;">文档名称</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:20%;">文档类型</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:10%;">编写人</td><td onmousemove="DG_moveOnTH(this)" onmousedown="DG_downOnTH(this)" onmouseup="this.mouseDown=false" onmouseout="this.mouseDown=false" style="width:20%;">提交时间</td>
</tr></thead><tbody><tr class="tablebody" onclick="javascript:return select(this,'0','WDZL');" ondblclick="__doPostBack('GridWDZL:_ctl3','Edit')" style="height:22px;">
<td>1</td><td>cbcdd896fc854c2494110c1814aced2b</td><td>25023C58BCA04DC9AA2D8B06AB59D165</td><td><input name="GridWDZL:_ctl3:_ctl0" type="text" style="background-color:PowderBlue;border-style:None;width:100%;" /></td><td>image/pjpeg</td><td><input name="GridWDZL:_ctl3:_ctl1" type="text" style="background-color:PowderBlue;border-style:None;width:100%;" /></td><td><input name="GridWDZL:_ctl3:_ctl2" type="text" value="2005-2-14 0:00:00" onclick="setday(this,this,'yyyy-mm-dd')" style="background-color:PowderBlue;border-style:None;width:100%;" /></td>
======================================
</tr><tr class="tablebody2" onclick="javascript:return select(this,'1','WDZL');" ondblclick="__doPostBack('GridWDZL:_ctl4','Edit')" style="height:22px;">
<td>2</td><td>c768a32f544444f894d7ca4c8bedab31</td><td>25023C58BCA04DC9AA2D8B06AB59D165</td><td> </td><td> </td><td> </td><td> </td>
</tr><tr align="Center" valign="Middle" style="font-size:9pt;height:22px;">
<td colspan="7" style="height:23px;"><a id="GridWDZL__ctl6_lbFirst" disabled="disabled">首页</a> <a id="GridWDZL__ctl6_lbPrve" disabled="disabled">上一页</a> <a id="GridWDZL__ctl6_lbNext" disabled="disabled">下一页</a> <a id="GridWDZL__ctl6_lbLast" disabled="disabled">末页</a> <span id="GridWDZL__ctl6_lblCurPage">【第1页</span><span id="GridWDZL__ctl6_lblPageCount">/共1页】</span> <span id="GridWDZL__ctl6_lblRowCount">【共2条】</span> <input name="GridWDZL:_ctl6:tbGoPage" type="text" id="GridWDZL__ctl6_tbGoPage" disabled="disabled" style="font-family:宋体;font-size:9pt;height:20px;width:40px;" /> <input type="submit" name="GridWDZL:_ctl6:btnGo" value="转到" id="GridWDZL__ctl6_btnGo" disabled="disabled" style="font-family:宋体;font-size:9pt;height:22px;width:40px;" /> </td>
</tr>
<tr style='height:auto;'><td colspan=7 style='BORDER-BOTTOM: thin solid'></td></tr></tbody><tfoot></tfoot></table><script language=javascript>function DG_moveOnTH(td)
{
if(event.offsetX > td.offsetWidth - 6 || event.offsetX < 6)
td.style.cursor = 'w-resize';
else
td.style.cursor = 'default';
if(td.mouseDown==true)
{
if (event.offsetX < 6)
{
td2 = td.previousSibling;
offset = event.x - td2.oldX;
td2.width = td2.oldWidth + offset;
td2.style.width = td2.width;
table=td;
while(table.tagName != 'TABLE') {table = table.parentElement;}
table.width = td2.tableWidth+offset;
table.style.width = table.width;
}
else
{
offset = event.x - td.oldX;
td.width = td.oldWidth + offset;
td.style.width = td.width;
td.style.cursor = 'w-resize';
table=td;
while(table.tagName != 'TABLE') table = table.parentElement;
table.width = td.tableWidth+offset;
table.style.width = table.width;
}
}
}
function DG_downOnTH(td)
{
if(event.offsetX > td.offsetWidth - 6)
{
td.mouseDown = true;
td.oldX = event.x;
td.oldWidth = td.offsetWidth;
table = td;
while(table.tagName != 'TABLE') table = table.parentElement;
td.tableWidth = table.offsetWidth;
}
else if(event.offsetX < 6)
{
td2 = td.previousSibling;
td.mouseDown = true;
td2.oldX = event.x;
td2.oldWidth = td2.offsetWidth;
table = td2;
while(table.tagName != 'TABLE') table = table.parentElement;
td2.tableWidth = table.offsetWidth;
}
else
td.mouseDown = false;
}</script></TD></tr></table>
<script>
function get()
{
var s=document.getElementsByName ('GridWDZL:_ctl3:_ctl0')[0];
if(s==null||typeof(s)=='undefined')
{
alert('找不到元素');
}
else
{
alert(s.value)
}
}</script>