开发者

JQuery UI question

开发者 https://www.devze.com 2023-02-10 16:16 出处:网络
I\'m using a JQuery UI dialog and I\'m wondering is it possible for me to define the dialog it\'s own <head> and <body> elements independant of that on 开发者_如何学Cthe page while still r

I'm using a JQuery UI dialog and I'm wondering is it possible for me to define the dialog it's own <head> and <body> elements independant of that on 开发者_如何学Cthe page while still remaining "the one page" if not, how else could I achieve this?


If your goal is strictly cosmetic, I am not certain what benefit there would be in using head and body tags rather than section or div tags. There is only one body per document, and there is only one head per document.


A jQuery UI dialog is just another DOM element. It simply add a div to the document window, so no you can't have another body or head tag in it. If you choose to output it anyway, it will show up but likely will not behave how you expect it would.

For example, the following output is invalid, which is exactly what you would get using jQueryUI.

<html>
    <head></head>
    <body>
        <div id="dialog">
            <head></head>
            <body> content </body>
        </div>

    </body>
</html>

What is it exactly that requires you to include another head tag? I am guessing you are trying to load a script asynchronously, if so there are many other ways to do that.

If you want a totally separate document, you can use an iframe in your dialog to achieve the same kind of effect.

0

精彩评论

暂无评论...
验证码 换一张
取 消