Markdown 常用js及css脚本
创建日期:2014-09-01 12:41

Javascript

在新窗口中打开页面

<script>
    var links = document.links;
    for (var i = 0, linksLength = links.length; i < linksLength; i++) {
       if (links[i].hostname != window.location.hostname) {
           links[i].target = '_blank';
       } 
    }
</script>

CSS

为图片指定宽度

<style>
    img{width:360px}
</style>