Code: Select all
function insertRule(rule){
sheet.insertRule(rule, sheet.cssRules.length);
}
Code: Select all
"Unable to get propery .length of undefined or null reference"
Code: Select all
<!-- :: Batch section
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
MSHTA.exe "%~F0"
PAUSE
EXIT /B
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
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FFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
HTML -->
<HTML>
<HEAD>
<HTA:APPLICATION SCROLL="no" BORDER="none" CAPTION="no" SHOWINTASKBAR="no" SYSMENU="no" ID="Card">
<META HTTP-EQUIV="x-ua-compatible" CONTENT="IE=9"/>
<STYLE TYPE="TEXT/CSS">
body {
background: #ffffff
}
button {
position:absolute;
left:10px;
color:#ffffff;
font-family: Arial, Sans Serif;
border:1px solid #ffffff;
border-radius:3px;
letter-spacing:0.3px;
font-size:20px;
padding:10px
}
</STYLE>
</HEAD>
<BODY>
<BUTTON>Hello</BUTTON>
<SCRIPT LANGUAGE="JavaScript">
sheet = window.document.styleSheets[0];
insertRule("button { background: #35507a; }")
function insertRule(rule){
sheet.insertRule(rule, sheet.cssRules.length);
}
</SCRIPT>
</BODY>
<HTML>
Code: Select all
<!-- :: Batch section
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
MSHTA.exe "%~F0"
PAUSE
EXIT /B
::STUFFFFFFFFFFFFFFFFFF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FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
::STUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
HTML -->
<HTML>
<HEAD>
<HTA:APPLICATION SCROLL="no" BORDER="none" CAPTION="no" SHOWINTASKBAR="no" SYSMENU="no" ID="Card">
<META HTTP-EQUIV="x-ua-compatible" CONTENT="IE=9"/>
<STYLE TYPE="TEXT/CSS">
body {
background: #ffffff
}
button {
position:absolute;
left:10px;
color:#ffffff;
font-family: Arial, Sans Serif;
border:1px solid #ffffff;
border-radius:3px;
letter-spacing:0.3px;
font-size:20px;
padding:10px
}
</STYLE>
</HEAD>
<BODY>
<BUTTON>Hello</BUTTON>
<SCRIPT LANGUAGE="JavaScript">
sheet = window.document.styleSheets[0];
insertRule("button { background: #35507a; }")
function insertRule(rule){
sheet.insertRule(rule, sheet.cssRules.length);
}
</SCRIPT>
</BODY>
<HTML>