alert的我O,my God. 这不科学。
<html>
<head>
<script>
var net = new Object();
function deal_online() {
var sysBBS = "欢迎光临心之语聊天室,请遵守聊天室规则,不要使用不文明用语。";
return sysBBS;
}
net.AjaxRequest = function(onload) {
this.onload = onload;
alert(onload);
alert(this.onload.sysBBS);
alert(this.onload.call(this));
}
function showOnline() {
var loader = new net.AjaxRequest(deal_online);
}
function ZhiJieDiaoYong(){
alert(deal_online());
}
</script>
<title>test</title>
<body>
<a href="javascript:showOnline()">Let's go!</a>
<p>
<a href="javascript:ZhiJieDiaoYong()">Directly!</a>
</body>
</html>