<style>.mydiv{width:300px;height:300px;background:red;}</style><divclass="mydiv"><divclass="content">这是一句话,删除的话会让mydivdisp
正则替换 UEditor pre 中的 'nbsp' 空格标签
今天在复制粘贴自己博客上的代码时发现,有的代码竟然无法执行!(pbootcms 的 if 语句)(???问号脸) 我代码有BUG?我复制粘贴的姿势不对?我……?仔细 F12 查看了一下,发现百度编辑器在使用 pre 代码区块时,会把空格自动换成空格占位符 “ ”
js 打印机打印指定局部区域
<!--startprint--><tablewidth="700"align="left"border="1"><tr><td>待打印的内容</td></tr></table><!--endprint-->&nbs
防止别人 iframe 自己的页面
如果对方是静态调用 iframe,用 js 阻止即可,<script>if(top!==self)top.location.replace(self.location.href);</script>如果对方是动态调用的,类似于下方代码,又禁用了我页面的 js 的话<scripttype="text/javascript"chars
js 复制粘贴文章时添加版权信息
<script>functionsetClipboardText(event){event.preventDefault();varnode=document.createElement('div');