在oil Table 文件中,有;两个网页文件,
<script type="text/javascript">
window.onload = function ()
{
changeBorder();
}
function changeBorder()
{
var tdCollections = document.getElementsByTagName("td");
for (var i = 0; i < tdCollections.length; i++)
{
if (tdCollections.attributes["locked"] != null && tdCollections.attributes["locked"].value == "true")
{
if (tdCollections.parentNode.rowIndex == (tdCollections.parentNode.parentNode.childElementCount - 1))
{
tdCollections.style.borderBottomColor = "WindowText";
tdCollections.style.borderBottomWidth = "3px";
}
if (tdCollections.cellIndex == (tdCollections.parentNode.childElementCount - 1))
{
tdCollections.style.borderRightColor = "WindowText";
tdCollections.style.borderRightWidth = "3px";
}
else
{
tdCollections.style.borderRightColor = "gray";
}
}
}
}
</script>
在oiltable中有用,而在放在oiltable.aspx中没有效果呢!
var tdCollections = document.getElementsByTagName("td");中的td为名的标签在哪里呢?
亲,以后你们给我编的代码能注解一下更好 |
|