I am trying to get a certain stylesheet from the head using javascript/jQuery.
I do not want to use $( head ).get(0).innerHTML
or similar cause the head is filled up with more than 30 script and link elements.
迄今为止,我曾尝试过这一尝试。
// that s the one
var $my_stylesheet = $(document.body.previousSibling).find( link:last );
//those did not work (result: "")
$my_stylesheet.get(0).innerHTML;
$my_stylesheet.text();
$my_stylesheet.html();
What can i do to get the stylesheet content from the head?