8 background-image: url(stars.gif);Ê
14 var helloText
= document
.getElementById("hello");
15 var positionField
= document
.getElementById("style position");
18 var textRule
= document
.styleSheets
[0].cssRules
[0];
19 var s
= textRule
.style
;
20 var leftValue
= s
.getPropertyCSSValue("left");
21 var bgImageValue
= s
.getPropertyCSSValue("background-image");
25 leftValue
.setFloatValue(leftValue
.primitiveType
, parseFloat(position
));
29 alert("setFloatValue " + e
.message
);
34 bgImageValue
.setStringValue(bgImageValue
.primitiveType
, "stripes.gif");
38 alert("setStringValue " + e
.message
);
44 <body onload=
"runTest();">
45 This test checks that a primitive CSS values can be set without generating an exception.
46 <div class=
"test" id=
"hello">Hello world
</div>
47 <pre id=
"console"></pre>