HTML DOM Rama / nieruchomość IFrame frameBorder
Rama / obiekty iframe
Definicja i Wykorzystanie
frameborder zestawy własności lub zwraca wartość właściwości elementu frameborder ramki / iframe.
frameborder atrybut określa, czy wyświetlać obramowanie wokół iframe.
gramatyka
frameObject.frameBorder=value
或者
iframeObject.frameBorder=value
或者
iframeObject.frameBorder=value
frameBorder atrybut może mieć następujące wartości:
值 | 描述 |
---|---|
1 | 开启边框(默认) |
0 | 关闭边框 |
Pomoc Browser
Wszystkie główne przeglądarki obsługują frameBorder własność
Przykłady
Przykład 1
Zwracana wartość frameBorder atrybut:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
</head>
<body>
<iframe id="myframe" src="http://www.w3big.com" frameborder="0">
<p>你的浏览器不支持 iframes.</p>
</iframe>
<p>这个frameborder已设置:
<script>
document.write(document.getElementById("myframe").frameBorder);
</script>
<p>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
</head>
<body>
<iframe id="myframe" src="http://www.w3big.com" frameborder="0">
<p>你的浏览器不支持 iframes.</p>
</iframe>
<p>这个frameborder已设置:
<script>
document.write(document.getElementById("myframe").frameBorder);
</script>
<p>
</body>
</html>
Spróbuj »
Przykład 2
Usuń frameborder:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<script>
function removeBorder(){
document.getElementById("myframe").frameBorder="0";
}
</script>
</head>
<body>
<iframe id="myframe" src="http://www.w3big.com">
<p>你的浏览器不支持iframes。</p>
</iframe>
<br><br>
<input type="button" onclick="removeBorder()" value="移除边界">
<p><b>注意:</b> 该实例不能工作在IE浏览器。</p>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<script>
function removeBorder(){
document.getElementById("myframe").frameBorder="0";
}
</script>
</head>
<body>
<iframe id="myframe" src="http://www.w3big.com">
<p>你的浏览器不支持iframes。</p>
</iframe>
<br><br>
<input type="button" onclick="removeBorder()" value="移除边界">
<p><b>注意:</b> 该实例不能工作在IE浏览器。</p>
</body>
</html>
Spróbuj »
Rama / obiekty iframe