免费刷票器的代码编写步骤
2018-08-01 17:58:09 | 分类:微信投票教程 | 评论:0人 | 浏览:1,652次
- 正文内容
- 我来说两句:(已有0人参与)
免费刷票器的代码编写步骤
免费刷票器是多少人梦寐以求的一个神器,如果你有这样的一个免费刷票器,那么你参加投票活动将可以不费吹灰之力就能够拿下自己想要的名次,很多人花费了大量的时间精力在寻找这样的免费刷票器上,那么今天我就要来跟大家分享一个免费刷票器的代码编写步骤,纯干货哦!!
一、新建脚本
脚本如下:
完成功能:选中某十个选手,随机生成身份证号。
// ==UserScript==
// @name 示例
// @namespace http://localhost/1/vote.htm
// @version 0.1
// @description enter something useful
// @match http://localhost/1/*.*
// @require http://code.jquery.com/jquery-1.11.0.min.js
// @copyright 2012+, You
// ==/UserScript==
document.getElementById(“ch63”).checked=true;
document.getElementById(“ch64”).checked=true;
document.getElementById(“ch60”).checked=true;
document.getElementById(“ch47”).checked=true;
document.getElementById(“ch48”).checked=true;
document.getElementById(“ch33”).checked=true;
document.getElementById(“ch27”).checked=true;
document.getElementById(“ch24”).checked=true;
document.getElementById(“ch20”).checked=true;
document.getElementById(“ch25”).checked=true;
javascript:document.getElementsByTagName(‘BODY’)[0].scrollTop=document.getElementsByTagName(‘BODY’)[0].scrollHeight;
var type=Math.floor(Math.random()*1000000);//生成0-9的随机数
var pepel=”412402197806″+type;
$(“input[name=’cid’]”).val(pepel);
二、网页及源码
我把网页下载下来了,大家只需要将其中的“1”文件夹放在自建的服务器下,比如我使用的apache+php,就将其放在htdocs文件夹下,在chrome里输入http://localhost/1/vote.htm
就可以看到,页面自动勾选了指定的十个选手,并生成了身份证号。
对于为何要这样写JS代码,呃……,会JS的一点难度没有,不会JS的应该看不懂……
PS:当然可以写ajax代码自动实现POST数据,网上的一个段代码,大家可以参考
$.ajax({
type : “POST”,
url : “Login.asp?r=” + Math.random(),
data : “txtUsn=” + usn + “&txtUsp=” + usp + “&txtPassCode=” + code,
async: false,
success : function(msg){
responseText = msg;
if(responseText.indexOf(“登录成功”) != -1)
{
alert(“登录成功.尝试次数:” + i);
location.href = “Login.asp”;
}
}
});
上一篇: 免费免费刷票软件如何编写?
下一篇:微信投票软件,如何编写?