一种办法是直接把CSS写进POPUP里去:
<style>
.section{font-size: 13px}
</style>
上面这段连同你的HTML一同写入createPopup()还有就是在你写入popup的HTML里写入一句<link href="aa.css"> 挂入现有的CSS文件
<style>
.section{font-size: 13px}
</style>
上面这段连同你的HTML一同写入createPopup()还有就是在你写入popup的HTML里写入一句<link href="aa.css"> 挂入现有的CSS文件
是这样吗?
好像不行,没有效果
function ActEvent(oPopupBody) {
for(var i=0;i<oPopupBody.childNodes(0).childNodes(0).childNodes.length;i++){//DIV,Table,TR,TD
oPopupBody.childNodes(0).childNodes(0).childNodes(i).onmouseover=function func_onmouseover() {
this.style.backgroundColor="#0000BD" ;
this.style.color="white" ;
this.childNodes(0).childNodes(0).style.color= "white";
//this.childNodes(0).childNodes(0).style.font = "bold";
//var aReturn = this.innerHTML;
//document.writeln(this.innerHTML);
}
...
}
没有办法,我只好用document.writeln(this.innerHTML);来知道当前的标签,再来用文档对象模型树来推算要控制哪些节点的属性了,其次就是看《DHTML 手册.chm》上面有关于css中对应的js脚本的写法。