Home >Web Front-end >JS Tutorial >Scroll bar inside Jquery iframe_jquery

Scroll bar inside Jquery iframe_jquery

WBOY
WBOYOriginal
2016-05-16 18:34:421041browse
Copy code The code is as follows:

//Call function
var pagestyle = function() {
var rframe = $("#mainFrame");
//ie7 will have up and down scroll bars by default, remove the top and bottom 15 pixels
var h = $(window).height() - rframe.offset ().top - 15;
rframe.height(h);
}
//Register loading event
$("#mainFrame").load(pagestyle);
// Register window resize event
$(window).resize(pagestyle);
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn