'selector' Example : Page « Style Layout « JavaScript DHTML






'selector' Example

    
<html>
<body>
<style>
@page:first { background-color: red }
@page:left { background-color: blue }
@page:right { background-color: orange }
</style>
<script language="JavaScript">
    function function1() {
        var m = document.styleSheets[0].pages[1];
        var n = m.selector; 
        alert(n); 
    } 
</script>
<input type="button" value="Click here" onclick="function1();">
</body>
</html>

    
      
      








Related examples in the same category