You are here: irt.org | FAQ | JavaScript | General | Q609 [ previous next ]
In Netscape Navigator you can use JavaScript Entities as follows:
<html>
<head>
<script language="JavaScript"><!--
var len = 200;
//--></script>
</head>
<body>
<hr width="&{len};">
</body>
</html>Microsoft Internet Explorer does not support JavaScript Entities, but you could try:
<html>
<head>
<script language="JavaScript"><!--
var len = 200;
//--></script>
</head>
<body>
<script language="JavaScript"><!--
document.write('<hr width="' + len + '">);
//--></script>
</body>
</html>