|
蓝森林 http://www.lslnet.com 2006年8月25日 8:28
tt.innerHTML="OKI ELECTRONICS"中间2个空格,怎么
[html]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>高级按钮</title>
</head>
<script language='javascript'>
function aa()
{
tt.innerHTML="OKI ELECTRONICS (HONG KONG) LTD";
}
</script>
<body>
<form method="POST">
<div id="tt"></div>
<button name="B3" onclick="aa()">按钮</button>
</form>
</body>
</html>
[/html]
请大家看一个现象,OKI ELECTRONICS中间是有2个空格的。当按按钮赋值的时候为什么显示出来的时候就只有一个空格呢 |
[html]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>高级按钮</title>
</head>
<script language='javascript'>
function aa()
{
tt.innerHTML="OKI ELECTRONICS (HONG KONG) LTD";
}
</script>
<body>
<form method="POST">
<div id="tt"></div>
<button name="B3" onclick="aa()">按钮</button>
</form>
</body>[/html] |
tt.innerText="OKI ELECTRONICS (HONG KONG) LTD";
|
|