解决了,看了vbscript的范例解决的,没想到在JS下也适用 呵呵。document.bgColor = parent.document.bgColor;

解决方案 »

  1.   

    bgColor属性应用于:
    body,document,marquee,table,tbody,td,tfoot,th,thead,tr
    在style对象中只有:
    backgroundColor
      

  2.   

    document.bgColor = parent.document.bgColor;
    这些都属于DHTML,并不是js或vbs,当然在vbs和js下都可以用
      

  3.   

    1
    <body bgcolor='#666666'>
    <iframe src="about:<script>alert(parent.document.body.bgColor)</script>" width=100 height=100></ifrmae>2
    <body bgcolor='#666666'>
    <iframe src="about:<script>alert(parent.document.body.bgColor)</script>" width=100 height=100></ifrmae>3.
    <body bgcolor='#666666'>
    <iframe src="about:<script>alert(parent.document.body.currentStyle.backgroundColor)</script>" width=100 height=100></ifrmae>