HTML DOM type ÊôÐÔ

¶¨ÒåºÍÓ÷¨

type ÊôÐÔ¿É·µ»ØÈ·Èϰ´Å¥µÄ±íµ¥ÔªËØÀàÐÍ¡£¶ÔÓÚÈ·Èϰ´Å¥£¬¸ÃÊôÐÔ×ÜÊÇ "submit"¡£

Óï·¨

submitObject.type

ʵÀý

ÏÂÃæµÄÀý×Ó¿É·µ»ØÈ·Èϰ´Å¥µÄ±íµ¥ÔªËØÀàÐÍ£º

<html>
<head>
<script type="text/javascript">
function alertType()
{
alert(document.getElementById("submit1").type)
}
</script>
</head>

<body>
<form>
<input type="submit" id="submit1" onclick="alertType()" />
</form>
</body>

</html>
VUE