刷数据

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="./jquery-1.7.2.min.js"></script>

<script type="text/javascript">
$(function(){
$("#button").click(function(){
var input = document.getElementById("number").value;
for(var i =0;i<input;i++){
$.post(
'http://api.maka.im/api/eventClick',
{btnid:'9M05SD4A_btn_80105929',pid:'9M05SD4A'},
function(data){
var count = $("#count").html();
$("#count").html(parseFloat(count)+1);
}
)
}
})
})
</script>
</head>
<body>
<p>刷票数:</p>
<td><input id = "number" type="text" class="input-text" value="100"></input></td>
<input id = "button" type="button" stype = "margin-left:50px;" value="Brush ticket"/><br/>
<div id="count">0</div>

</body>
</html>

原文地址:https://www.cnblogs.com/jiangsheng3/p/5151544.html