//赋值给地图右下方的方格中
function MapViewShow() {
$("#ShowFunction1").attr("onclick","ControllerOnclickBackgroundColor(ShowFunction1,'mapcity.ZoomIn')")
$("#ShowFunction1").addClass("fa fa-search-plus");
}
function ControllerOnclickBackgroundColor(thisInfo,functionName){
$(".MapRightBottomView").css("background-color","write");
thisInfo.style.backgroundColor='blue'
var cTest = new ccc(functionName);
try{
cTest.func();
}catch(e){
}
}
//调用参数方法
function ccc(methodName){
this.func = new Function(methodName+"();");
}
JS中用方法名作为参数,并运行该方法
最新推荐文章于 2023-03-02 11:28:06 发布