<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>emu</title>
</head>
<body>
<table id=table1><tr id=tr1><td id=td1></td></tr></table>
<SCRIPT LANGUAGE="JavaScript">
<!--
alert(isChild(tr1,table1))
alert(isChild(td1,table1))
alert(isChild(td1,tr1))
alert(isChild(tr1,td1))function isChild(t1,t2)
{
while (t1!=t2 && t1.parentNode!=null)
t1=t1.parentNode;
return (t1==t2)
}
//-->
</SCRIPT>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>emu</title>
</head>
<body>
<table id=table1><tr id=tr1><td id=td1></td></tr></table>
<SCRIPT LANGUAGE="JavaScript">
<!--
alert(isChild(tr1,table1))
alert(isChild(td1,table1))
alert(isChild(td1,tr1))
alert(isChild(tr1,td1))function isChild(t1,t2)
{
while (t1!=t2 && t1.parentNode!=null)
t1=t1.parentNode;
return (t1==t2)
}
//-->
</SCRIPT>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货