JS獲取iframe中marginHeight和marginWidth屬性的方法
更新時間:2015年04月01日 12:04:46 作者:瘋狂一夏
這篇文章主要介紹了JS獲取iframe中marginHeight和marginWidth屬性的方法,涉及javascript操作iframe屬性的技巧,并分析了marginHeight和marginWidth屬性的功能,非常具有實用價值,需要的朋友可以參考下
本文實例講述了JS獲取iframe中marginHeight和marginWidth屬性的方法。分享給大家供大家參考。具體如下:
<!DOCTYPE html>
<html>
<body>
<iframe id="myframe" src="demo_iframe.htm"
marginheight="50" marginwidth="50">
<p>Your browser does not support iframes.</p>
</iframe>
<br><br>
<p>The value of the marginheight attribute and marginwidth are:
<script>
document.write(document.getElementById("myframe").marginHeight);
document.write(document.getElementById("myframe").marginWidth);
</script>
<p>
</body>
</html>
希望本文所述對大家的javascript程序設(shè)計有所幫助。
您可能感興趣的文章:
- JS獲取scrollHeight問題想到的標準問題
- js中top、clientTop、scrollTop、offsetTop的區(qū)別 文字詳細說明版
- js中scrollHeight,scrollWidth,scrollLeft,scrolltop等差別介紹
- js獲取height和width的方法說明
- js中top/parent/frame概述及案例應用
- 利用JS解決ie6不支持max-width,max-height問題的方法
- js中的preventDefault與stopPropagation詳解
- js中top的作用深入剖析
- window.top[_CACHE]實現(xiàn)多個jsp頁面共享一個js對象
- JS中完美兼容各大瀏覽器的scrolltop方法
- js中不同的height, top的區(qū)別對比
相關(guān)文章
理解JavaScript的caller,callee,call,apply
文章挺好的,雖然我用的是jQuery,但感覺還是有些用的~~~2009-04-04

