JavaScript
revent
炫酷人生
展开
-
javaScript prototype原型的理解
function Box(){};Box.prototype.name = "lishiming";Box.prototype.age = 23;Box.prototype.run = function(){ return this.name;};var box = new Box();var box2 = new Box();alert(box.name);alert(...原创 2015-12-15 11:39:28 · 890 阅读 · 0 评论 -
禁用浏览器后退功能
<script type="text/javascript">//当退出登陆时,禁用浏览器后退功能,有效防止退出后的用户直接直接返回系统中history.pushState(null, null, document.URL);window.addEventListener('popstate', function () { history.pushState(null, nu...原创 2019-03-30 10:18:13 · 327 阅读 · 0 评论