简体   繁体   中英

get parent frame height with jQuery

I want to get the height of parent frame with jQuery.

It's my orginal script

var iframeElement = parent.document.getElementById('FrmPatient'); 
iframeElement.style.height = 170;

I want to change this script to jQuery style. How to get that?

您可以尝试以下方法:

$("#FrmPatient", parent.document).css("height", 170);
$('FrmPatient').parent().css('height', '170px');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM