Site Notice
hello, world
Difference between revisions of "Do not press the button"
From Project-EPB Commons
([InPageEdit] 没有编辑摘要) |
([InPageEdit] 没有编辑摘要) |
||
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<html> | <html> | ||
<b style="color:#b00">警告:网页可能会崩溃</b><br/> | <b style="color:#b00">警告:网页可能会崩溃</b><br/> | ||
− | <button onclick="showNew()" | + | <button onclick="showNew()" id="clickMe">绝对不要点我</button> |
− | + | <p id="new" style="display:none">呵呵,你偏要点?</p> | |
− | <p id="new" style="display:none"> | ||
− | |||
<style> | <style> | ||
− | button { | + | /* |
+ | button#clickMe { | ||
padding: 0.5em 0.7em; | padding: 0.5em 0.7em; | ||
background: #3380ff !important; | background: #3380ff !important; | ||
Line 13: | Line 12: | ||
border: 1px solid #3380ff; | border: 1px solid #3380ff; | ||
} | } | ||
+ | */ | ||
</style> | </style> | ||
<script> | <script> | ||
function showNew() { | function showNew() { | ||
− | $('# | + | $('#clickMe').hide().attr('disabled',''); |
+ | $('#new').show(50); | ||
setTimeout(function () { | setTimeout(function () { | ||
− | $('#new'). | + | $('#new').html('算了算了,没啥大不了的。'); |
− | |||
setTimeout(function () { | setTimeout(function () { | ||
− | $('# | + | $('#new').html('呵呵,你以为我会这样放过你?(<b style="color:#b00">警告:网页可能会崩溃,建议直接关掉标签页</b>)'); |
− | |||
− | |||
setTimeout(function(){ | setTimeout(function(){ | ||
− | $('# | + | $('#new').html('死吧!!!'); |
− | setInterval(function(){ | + | var limit = setInterval(function(){ |
− | $('# | + | $('#new').html(function(){ |
var $this = $(this); | var $this = $(this); | ||
var before = $this.text(); | var before = $this.text(); | ||
Line 33: | Line 31: | ||
return final; | return final; | ||
}); | }); | ||
+ | if (typeof(x) === 'undefined') x = 1; | ||
+ | console.info(x); | ||
+ | x = x+1; | ||
+ | // if (x > 20) clearInterval(limit); | ||
},100); | },100); | ||
},3000); | },3000); |
Latest revision as of 01:19, 2 February 2020
<html> <b style="color:#b00">警告:网页可能会崩溃</b><br/> <button onclick="showNew()" id="clickMe">绝对不要点我</button> <p id="new" style="display:none">呵呵,你偏要点?</p> <style> /*
button#clickMe { padding: 0.5em 0.7em; background: #3380ff !important; color: white; font-weight: bold; border: 1px solid #3380ff; } */
</style> <script>
function showNew() { $('#clickMe').hide().attr('disabled',''); $('#new').show(50); setTimeout(function () { $('#new').html('算了算了,没啥大不了的。'); setTimeout(function () { $('#new').html('呵呵,你以为我会这样放过你?(<b style="color:#b00">警告:网页可能会崩溃,建议直接关掉标签页</b>)'); setTimeout(function(){ $('#new').html('死吧!!!'); var limit = setInterval(function(){ $('#new').html(function(){ var $this = $(this); var before = $this.text(); var final = before + before; return final; }); if (typeof(x) === 'undefined') x = 1; console.info(x); x = x+1; // if (x > 20) clearInterval(limit); },100); },3000); }, 3000); }, 3000); }
</script> </html>