Marco HTML DOM / iframe frameBorder propiedad
Frame / objetos IFrame
Definición y Uso
FRAMEBORDER conjuntos de propiedades o devuelve el elemento frameborder marco / iframe valor de la propiedad.
atributo frameborder especifica si se debe mostrar un borde alrededor del marco flotante.
gramática
frameObject.frameBorder=value
或者
iframeObject.frameBorder=value
或者
iframeObject.frameBorder=value
frameBorder atributo puede tener los siguientes valores:
值 | 描述 |
---|---|
1 | 开启边框(默认) |
0 | 关闭边框 |
Soporte para el navegador
Todos los principales navegadores soportan la propiedad frameBorder
Ejemplos
Ejemplo 1
Valor de retorno atributo frameborder:
<!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>
Trate »
Ejemplo 2
Retire 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>
Trate »
Frame / objetos IFrame