JavaScript Reference/Javascript Properties/width pre
Версия от 18:30, 25 мая 2010; (обсуждение)
"width" Example
<html>
<body>
<pre id="myPre"
style="font-size:14pt;">This text is embedded within pre tags.</pre>
<script language="JavaScript">
document.all.myPre.width = "300";
</script>
</body>
</html>
"width" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<pre> |
+----------------+--------------------------------------------------------------+
"width" Syntax and Note
Note:
Read and write property.
Set the element width.
Syntax:
document.getElementById("preID").width = value
document.all.preID.width = value // IE only