javascript - CSS in newly-created window -
I'm creating a new window using javascript (w / jQuery), and I'm creating new nodes in the new body Add the window to the code like this:
var consoleWindow = window.open ('', '', 'width = 460, height = 345'); $ (ConsoleWindow.document) .find ('body') attached ($ ("#debug_console")). The problem is that I have assumed that the CSS rules for the parent window will apply to the nodes in the child window, instead I can get the format HTML without it. How do I apply CSS in a new window? thanks for your help.
Just use something like this
$ (consoleWindow) .document) ('& lt; link rel = "stylesheet" href = "style.css" type = "text / css" /> gt;'); But you have to point to link href from your CSS file.
Comments
Post a Comment