[讨论]怎么样做到传递参数给oncilck事件触发的函数,而不在增加test按钮时执行该函数
<HTML>
<HEAD>
<title>test</title>
<script language="javascript">
function test()
{
var testInput = document.createElement("<input>");
testInput.setAttribute("type","button");
testInput.setAttribute("name","test");
testInput.setAttribute("id","testq");
testInput.setAttribute("value", "test");
testInput.setAttribute("onclick",test1("arg"));
Form1.insertBefore(testInput);
}
function test1(obj){
alert(obj);
}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post">
<INPUT style="Z-INDEX: 101; LEFT: 184px; POSITION: absolute; TOP: 48px" type="button" value="增加TEST" onclick="test();">
</form>
</body>
</HTML>
怎么样做到传递参数给oncilck事件触发的函数,而不在增加test按钮时执行该函数