我有一个带有按钮的 html 页面,该按钮的 onclick 调用了一个 javascript 函数......但是两天来我一直收到一个函数未定义错误!有人可以帮忙吗?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/jquery.mobile-1.2.1.css" />
<link rel="stylesheet" href="css/jqm-docs.css"/>
<script src="js/jquery-1.7.1.min.js"></script>
<script src="js/jqm-docs.js"></script>
<script src="js/jquery.mobile-1.2.1.js"></script>
<script>
function doSomething(){
alert('this is a test');
}
</script>
</head>
<body>
<div data-role="dialog">
<div data-role="content" id = "test" data-theme="c">
<a href="$callback" data-role="button" data-theme="b" onClick = "doSomething();return true;" rel = "external">$confirm</a>
<a href="#" data-role="button" data-rel="back" data-theme="c">Cancel</a>
</div>
</div>
</body>
</html>