<script language="javascript" src="editor_full/editor.js"></scrip>
<script language="javascript" >
var a=document.getElementById('TT1');
a.style.backgroundColor="IframeID.document.bgColor";
</script>
这段代码是在a.jsp文件中,这个“IframeID.document.bgColor”是editor.js 里面的一个存放颜色值的变量,整段代码想要达到的目的是从editor.js里读取IframeID.document.bgColor并将它赋值给a.style.backgroundColor,但怎么会不行呢?求教各位高手解决,只要解决了,就送分。
<script language="javascript" >
var a=document.getElementById('TT1');
a.style.backgroundColor="IframeID.document.bgColor";
</script>
这段代码是在a.jsp文件中,这个“IframeID.document.bgColor”是editor.js 里面的一个存放颜色值的变量,整段代码想要达到的目的是从editor.js里读取IframeID.document.bgColor并将它赋值给a.style.backgroundColor,但怎么会不行呢?求教各位高手解决,只要解决了,就送分。
java有获取背景颜色的函数吧。
你可以用CSS.专门控制显示格式的,把合适信息写在CSS文件里面.