This blog uses responsible cookies for functionality and user preferences.
Google Analytics is used for collecting general public information to understand how my blog is used.
Learn moreDear visitors,
This blog and the Tigarus.com network will be changing our website software in May (2024). There will be some down time and there will be a change to the webpage addresses.
We will also be removing the Anime blogs. The Rocksmith Songs website will be unavailable of a few weeks or months while I move the database to the new software.
At the moment we are running on Wordpress, the new software is an in-house project which is 57 times faster. It will also provide more freedom for development.
Thank you for understanding.
Script Title: viewStyleSheet
Programming Language: Java Script
Date Completed: 2012/11/23
Purpose: View the rules and it’s properties of a Cascading Style Sheet (CSS) in an array.
Description: Select the HTML Document Style Sheet and view it’s contents as an array.
Returns a one dimensional array. Returns array[0] as Access is denied if the style sheet does not exist or if the external style sheet is not accessible. Returns undefined if the function argument is not a number or the index is higher than the amount of style sheets.
Note: Modern Web browsers may return short hand CSS Rules as short hand, older Web browser such as IE7 will return short hand in it’s full expanded form.
Compatibility:
External Style Sheet Support: Firefox, Opera 12
In DOM Style Sheet Support: Firefox, Chrome, Opera 11, MSIE 7
Not Tested: Netscape, Safari
Method:
viewStyleSheet ( index_i );
Example Usage:
HTML
<style type=”text/css”>
/* my style sheet */
p {
color: black;
}
</style>
Java Script
var myArray = viewStyleSheet ( 0 );
document.write( myArray[0] );
Returns p {color:black;}
Terms of Use, Cookies, Privacy, and more, see Terms and Privacy
Third-party copyrights and trademarks featured on this site are owned by their respected holders.
Website written and designed by Patcoola 2019, some rights reserved.
This blog uses responsible cookies for functionality and user preferences.
Google Analytics is used for collecting general public information to understand how my blog is used.
Learn moreDear EU visitor, I am required to ask you consent for the following.