This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window) { | |
var document = window.document; | |
var loadScript = function(uri) { | |
var script = document.createElement('script'); | |
script.src = uri; | |
document.querySelector('head').appendChild(script); | |
}; | |
window.loadScript = loadScript; | |
})(window) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var connect = require('connect'); | |
var port = parseInt(process.argv[2]) || 3000; | |
var app = connect() | |
.use(connect.logger('dev')) | |
.use(connect.static(__dirname)) | |
.use(connect.directory(__dirname)) | |
.use(function(req, res){ | |
res.end('wrong url\n'); | |
}) | |
.listen(port); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = { | |
b:function() { console.log(this); } | |
} | |
//求下面的输出 | |
a.b(); | |
c = a.b(); | |
(1, a.b)(); | |
(a.b)() |
NewerOlder