JavaScript Reference/Javascript Collections/pages
Версия от 18:30, 25 мая 2010; (обсуждение)
Содержание
"pages" Example
<html>
<head><style type="text/css" id="myStyle">
@page:first {font-family:Times New Roman; font-size:18pt; color:blue;}
@page:left {font-family: Verdana; font-size: 14pt;}
@page:right {font-family: Verdana; font-size: 14pt;}
</style>
</head>
<body>Body content.
<script language="JavaScript">
var m = document.styleSheets(0).pages.length;
alert(m);
</script>
</body>
</html>
"pages" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |styleSheet |
+----------------+--------------------------------------------------------------+
"pages" JavaScript properties and JavaScript methods
JavaScript properties and JavaScript methods
item(), length
"pages" Syntax Parameters and Note
Note:
Returns an array of all style sheets that make use of the @page rule.
Syntax:
document.styleSheets(index).pages // returns all @page rules
document.styleSheets(index).pages(param1) // returns an individual @page rule
Parameters:
param1 Required; the zero-based index