<table width="600px">
<tr>
<td >
<textarea id="TextArea1" name="text" cols="20" style="width:590px;height:80px;" rows="2"></textarea>
</td>
</tr>
<tr>
<td >
<asp:Button ID="Btn_Ok" runat="server" Text="确 定" onclientclick="show(this)" />
<asp:Button ID="Btn_Can" runat="server" Text="取 消" />
</td>
</tr>
</table>
点 确定后要用JS获取TextArea1的值。不能用window.doc.GyId()这些。。因为是在Datali里面。
怎么获取呢?
<tr>
<td >
<textarea id="TextArea1" name="text" cols="20" style="width:590px;height:80px;" rows="2"></textarea>
</td>
</tr>
<tr>
<td >
<asp:Button ID="Btn_Ok" runat="server" Text="确 定" onclientclick="show(this)" />
<asp:Button ID="Btn_Can" runat="server" Text="取 消" />
</td>
</tr>
</table>
点 确定后要用JS获取TextArea1的值。不能用window.doc.GyId()这些。。因为是在Datali里面。
怎么获取呢?
function show(btn)
{
var v = btn.parentNode.parentNode.previousSibling.cells[0].getElementsByTagName("TextArea")[0].value;
alert(v);
}</script>
onclientclick="javascript:return show(this)" />