一直搞不懂onclick等这些事件中后面的函数到底要不要加括号,谁能系统的给我讲一下。谢谢了
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
function onclick1() {
alert(document.getElementById("textbox1").value);
}
</script>
</head>
<body>
<input type="text" id="textbox1" />
<input type="button" value="请点击" onclick="onclick1()"/>和
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
function onclick1() {
alert(document.getElementById("textbox1").value);
}
</script>
</head>
<body>
<input type="text" id="textbox1" />
<input type="button" value="请点击" onclick="onclick1"/>的区别
一直搞不懂onclick等这些事件中后面的函数到底要不要加括号,谁能系统的给我讲一下。谢谢了