日期:2009-07-02  浏览次数:21066 次

editRegions.htm

<HTML>
<HEAD>
<TITLE>Editable Regions Sample</TITLE>


<STYLE>
BODY{margin:0;
        background:white;
        font-family:verdana;
        font-size:80%;}
BUTTON {cursor:hand;
        background:#ffffff;
        border-color:#99ccff;
        font-weight:bold;}
.bar{background:#336699;
        width:100%;
        height:30px;
        border-top:1px solid #99CCFF;
        border-bottom:1px solid #000000;}
.desbar{background:#FFFFFF;
        width:100%;
        padding: 10px;
        border-top:1px solid #CCCCCC;
        border-bottom:1px solid #000000;
        color:black;
        font-size:8pt;
        height:105;}
.title{font-size:15pt;
        color:white;
        padding-left:10px;}
.bar A:link {text-decoration:none; color:white}
.bar A:visited {text-decoration:none; color:white}
.bar A:active {text-decoration:none; color:white}
.bar A:hover {text-decoration:none; color:yellow}
</STYLE>

<SCRIPT>
<!-- The fnInit function initializes the editable and non-editable regions -->
<!-- of the document                                                       -->     
function fnInit(){
    <!-- Ensure the display interface is not selectable, by making all     -->
    <!-- elements UNSELECTABLE                                             -->
    for (i=0; i<document.all.length; i++)
            document.all(i).unselectable = "on";
    <!-- Prepare the editable regions                                      -->
    oDiv.unselectable = "off";
    oTextarea.unselectable = "off";
}

<!-- The fnToggleEdits function turns editing on or off in the editable -->
<!-- regions of the document