前端开发
789
<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