当前位置: 代码迷 >> 综合 >> js 回调函数
  详细解决方案

js 回调函数

热度:67   发布时间:2024-02-12 02:57:34.0

<div id="apDiv1">
<button οnclick="f1()">回调</button>
</div>

<script>
function f1(){
getInput("Javascript" , 
function(generalLastName,str){
console.log(generalLastName + ":" + str)  
});
}
function getInput(options, callback){
var str = options;
callback('message',str);
}
</script>

  相关解决方案