<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>Document</title>
<script>
var objData = {
name:function(){
return "boYang";
},
id:function(){
return "0113";
}
};
(function(){
window.objData=$=objData;
})();
(function($){
$.objFunction= function(fn){
fn("hello word !!!!");
}
})(objData);
function show(sayHello){
alert(sayHello);
}
function click(){
objData.objFunction(show);
}
</script>
</head>
<body>
<input type="reset" onclick="click();"/>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>Document</title>
<script>
var objData = {
name:function(){
return "boYang";
},
id:function(){
return "0113";
}
};
(function(){
window.objData=$=objData;
})();
(function($){
$.objFunction= function(fn){
fn("hello word !!!!");
}
})(objData);
function show(sayHello){
alert(sayHello);
}
function click(){
objData.objFunction(show);
}
</script>
</head>
<body>
<input type="reset" onclick="click();"/>
</body>
</html>