<SCRIPT LANGUAGE="JavaScript">
<!--
function add()
{
document.all.d1.innerHTML = "<input name=t1>12312"
}//-->
</SCRIPT>
<form name=form1 method=post>
<input type=button value=click name=b1 onclick="add()">
<div id=d1></div>
</form>
<!--
function add()
{
document.all.d1.innerHTML = "<input name=t1>12312"
}//-->
</SCRIPT>
<form name=form1 method=post>
<input type=button value=click name=b1 onclick="add()">
<div id=d1></div>
</form>
如果onclick就write('l')的话'l' 会替换整个页面解决方法很简单: 只需要指明'l'的写入位置就行了 比如将document.write('l');
改为window.document.all('dd').value=='l'
不知道,你想作什么,
这条语句我没试过
不过这个错误我犯过
一定要指明写入地点