javascript文件是外部但似乎加载,如果我查看页面的来源并单击js链接我得到完整的js源
<head>
<title><?php echo $main_vars["site"]; ?></title>
<link href="<?php echo $main_vars["theme"] ?>css/main.css"
rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="./js/main.js"></script>
</head>
但它没有从表单提交
成功调用js函数<form id="register" onsubmit="submitRegister(); return false;">
...
<input type="submit" name="button" id="button" value="Register" />
</form>
我在js中有一堆警告没有触发
<script type="text/javascript">
// Save some typing on the document elements
function _(id) {
return document.getElementById(id);
}
/* AJAX process registration form */
function submitRegister() {
_("button").disabled = true;
_("status").innerHTML = 'Please wait ...';
alert("In submitRegister");
知道这里发生了什么吗?