-----onchange-------
-----this.parentNode.nextSibling.value=this.options[this.selectedIndex].text------
<div style="position:relative;width:110px;">
<span style="margin-left:35px;width:18px;overflow:hidden;float:right">
<asp:DropDownList ID="ddlDockCode" runat="server" onChange="this.parentNode.nextSibling.value=this.options[this.selectedIndex].text" style="width:113px;margin-left:-92px" AppendDataBoundItems="True" >
<asp:ListItem Text="SELECT" Value=""/>
</asp:DropDownList>
</span>
<asp:TextBox ID="txtDockCode" runat="server" style="width:90px;position:absolute;left:0px;BACKGROUND-COLOR:#f6f6f6;" MaxLength="10" />
</div>
nextSibling:获取文档树中与此元素位于同一级别的下一个元素。
parentNode:获取或设置作为当前节点的父节点的 SiteMapNode 对象。
*********************************************************************
---onclick---
---var child = document.all[event.srcElement.getAttribute("child",false)]----
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<script language="javascript">
function show(c)
{
var child = document.all[event.srcElement.getAttribute("child",false)];
if(child.style.display == "inline")
{
child.style.display = "none";
c.src = "../images/arrowup1.gif";
}
else
{
child.style.display = "inline";
c.src = "../images/arrowdown1.gif";
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<table style="width: 357px" border="1">
<tr>
<td colspan="3" width="5%" style="height: 21px">
<img src="../images/arrowdown1.gif" id="openImages" οnclick="show(this)" child="tr1"/></td>
<td colspan="1" style="height: 21px">
</td>
</tr>
<tr id="tr1" runat="server" style=" display:inline">
<td colspan="4" style="height: 21px">
test112345678</td>
</tr>
<tr>
<td colspan="3" width="5%">
<img src="../images/arrowdown1.gif" id="closeImages" οnclick="show(this)" child="tr2" /></td>
<td colspan="1" style="height: 21px">
</td>
</tr>
<tr id="tr2" runat="server" style=" display:inline">
<td colspan="4" >
test287654321</td>
</tr>
</table>
</div>
</form>
</body>
</html>