function clearText()
{
//清除文本框
var col = Form1.getElementsByTagName("INPUT");
for ( var i = 0;i < col.length;i ++ )
{
if ( col[i].type == "text" )
col[i].value = "";
}
//清楚下拉框
var selectlist=document.getElementsByTagName("select");
for(var i=0;i <
{
selectlist[i].selectedIndex=0 ;
}
}
//按回车触发按钮事件
<script language="javascript">
function document.onkeydown()
{
var e=event.srcElement;
if(event.keyCode==13)
{
document.getElementById("需要点击的那个按钮的id").click();
return false;
}
}
</script>