<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD><BODY>
<P ID=oPara STYLE="color:green;">
This is the test paragraph.</P><BUTTON onclick="alert(oPara.style.cssText);oPara.style.cssText='color:red';">
Get CSS attributes</BUTTON></BODY>
</HTML>

解决方案 »

  1.   

    <link id=m rel=stylesheet href="docEdit.css" type="text/css">
    <input onclick="document.all.m.href='http://lucky.myrice.com/cssforv6/index.css'" value="change" type=button>
      

  2.   

    谢谢flyycyu(fly)
    不过我还想
    有没有能直接引入一个.css文件的方法呢?
      

  3.   

    选择界面风格:
    <select onchange="document.styleSheets[0].href=this.options[this.selectedIndex].value+'.css'" id=select1 name=select1>
    <option value="Style/new">默认风格</option>
    <option value="Style/red">粉红风情</option>
    <option value="Style/blue">蓝色港湾</option>
    <option value="Style/black">灰暗忧郁</option>
    </select>
      

  4.   

    不过好像在帧里面修改别的帧页面里的css有时候会出现错误,以前XXM的页面动态改变css的时候就有这个问题,不知道现在解决没有。