iframe框架样式

<script type="text/javascript">
        //设定框架样式
        function setSize() {
            jQuery("#IframeMain").height(jQuery(top.window).height()-160);
            jQuery("#IframeMain").width(document.body.offsetWidth);
        }

        jQuery(function() {
            setSize();
        })

        $(window).resize(function() {
            setSize();
        })
    </script>

<body style="margin-top: 0px; margin-left: 0px; margin-right: 0px; overflow: hidden">
    <form id="Form1" method="post" runat="server">
    <table width="100%" align="center" border="0">
        <tr>
            <td valign="top" height="100%">
                <iframe name="IframeMain" id="IframeMain" style="overflow-y: auto; overflow-x: hidden;"
                    frameborder="0" width="100%" runat="server"></iframe>
            </td>
        </tr>
    </table>
    </form>
</body>

posted @ 2013-05-20 23:24  Trilyn  阅读(354)  评论(0)    收藏  举报