我该怎么办?
<script type="text/javascript">
function add(){
var a = document.getElementById("n1").value;
var b = document.getElementById("n2").value;
document.getElementById("result").value = parseInt(a)+parseInt(b);
}
</script>
<form>
<input type="text" id="n1">+
<input type="text" id="n2">
<input type="button" value="=" onclick="add();">
<input type="text" id="result">
</form>
“未捕获的ReferenceError:未定义添加”