这个函数到底传了什么过去啊?
function DigitizePoint() {
ShowResults( " ");
parent.parent.mapFrame.DigitizePoint(OnPointDigitized);//就是这个括号中的OnPointDigitized是参数还是下面这个函数名呢?上下文根本找不到OnPointDigitized这个参数名
}
function OnPointDigitized(point) {
ShowResults( "X: " + point.X + ", Y: " + point.Y);
}
------解决方案--------------------下面是一个例子:
<script type= "text/javascript ">
<!--
function reverse(str){
var ar = str.split( " ");
ar.reverse();
return ar.join( " ");
}
function output(fn,str){
//对一个字符串进行fn函数处理
return fn(str);
}
alert(output(reverse, "this is a demo! "));
//-->
</script>