0
는 다음 코드 내가다른 함수에 매개 변수로 js 함수를 보내는 방법은 무엇입니까?
이exec(param1,param2,
function(data){
alert (data);
});
이 라인 fun('test');
객체가 아닌 함수
를 말한다 전화
function exec(param1,p2,fun){
xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange=function(fun){
data=xmlhttp.responseText;
fun(data);
}
// rest ajax connection code
}
에게 있습니다
어떤 아이디어가 있습니까?
나를 위해 일해 ... http://jsfiddle.net/jHbsW/ – canon
나를 위해 일합니다. – Hubro
'console.log (fun)'(또는'console.log (exec)')는 무엇을 보여줍니까? –