JS的另类写法(书签栏工具原型)
文章目录
<script type="text/javascript">
javascript : void (function(version) {
var scriptTag = document.createElement('script');
scriptTag.type = 'text/javascript';
scriptTag.src = 'http://code.jquery.com/jquery-' + version + '.min.js';
alert(scriptTag.src);
}('1.6.4'));
</script>
书签栏工具就是用这个方法实现的。
来源于:https://github.com/brian-c/phantom-limb/blob/master/bookmarklet.js
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论