name 属性可设置或返回确认按钮的名称。
submitObject.name=name
下面的例子可显示出该确认按钮的名称:
<html>
<body>
<form>
<input type="submit" id="submit1" name="submit1" />
</form>
<p>The name of the submit button is:
<script type="text/javascript">
x=document.getElementById('submit1');
document.write(x.name
);
</script></p>
</body>
</html>