[英]jQuery - Change an iframe width of a child
I am facing a problem that I need to change the width of an iframe in a child node. 我面临一个问题,我需要更改子节点中iframe的宽度。
For example: 例如:
<div id="pNode">
<div>
<iframe>...</iframe>
</div>
</div>
There are no IDs for childnode and iframe. 没有用于childnode和iframe的ID。 How can I change the width? 如何更改宽度?
只需假设问题中的结构,选择iframe:
$('#pNode div iframe').attr('width',/* Your width */)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.