求JavaScript整人代码

JavaScript016

求JavaScript整人代码,第1张

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>

<meta http-equiv="Content-Type" content="text/htmlcharset=UTF-8">

<title>Document</title>

<script type="text/javascript">

function myadd(obj,e,fn){

if(obj.attachEvent){

obj.attachEvent("on"+e, fn)

}else{

obj.addEventListener(e,fn,false)

}

}

myadd(window, 'load',function(){

var box1 = document.getElementById("box1")

var close = document.getElementById("close")

var nr = document.getElementById("nr")

var i = 0

var shuzu = [

'哈哈你被整了!1',

'哈哈你被整了!2',

'哈哈你被整了!3',

'哈哈你被整了!4',

'哈哈你被整了!5',

'哈哈你被整了!6',

'哈哈你被整了!7',

'哈哈你被整了!8',

'哈哈你被整了!9',

'哈哈你被整了!0','哈哈你被整了!1',

'哈哈你被整了!2'

]

close.onclick = function(){

i++

if(i == 12){

i = 0

}

nr.innerHTML = shuzu[i]

box1.style.display = 'none'

window.setTimeout(function(){

box1.style.display = 'block'

},400)

}

})

</script>

</head>

<style type="text/css">

.box1{

background:#ccc

width:200px

margin:200px auto

}

.bgs{

position:fixed

top: 0px

left: 0px

background:rgba(0,0,0,0.4)

width:100%

height: 100%

}

.box1 .close{

font-size: 18px

line-height:40px

background:red

color:white

cursor: pointer

}

</style>

<body>

<div class="bgs" id = 'box1'>

<div class="box1" >

<div class="close" id = 'close' style = 'text-align:ceter'>点我关闭吧 x</div>

<div class="nr" id= 'nr'>哈哈你被整了!</div>

</div>

</div>

</body>

</html>

如果在自己电脑上浏览器上输入javascript:........,

相当于执行一段javascript代码

作用是将你在校内首页中id为publisher_statusInput的输入框的值改为'我是2B青年',然后自动提交。

这个太容易实现了,直接多写几个alert就可以了,例如:

<!doctype html>

<html>

<head>

<meta charset="UTF-8">

<title>实例</title>

</head>

<body>

<script type="text/javascript">

alert('哈哈哈哈')

alert('哈哈哈哈')

alert('哈哈哈哈')

alert('哈哈哈哈')

</script>

</body>

</html>

把哈哈哈改为自己需要的字就可以了