今天做个浇水机,也不知好用不,需要浇水的朋友请留下小树代码,我会尽力的,路过的朋友也麻烦浇下水哦,这么多渴着的花花草草都需要你的帮助呐,谢谢朋友们啦,欢迎有空时常来串门哦...
浇水机代码:(拷入特效就行了)
<b>批量浇水</b><br>
<textarea style='width:500px;border:1px solid #999;' rows=4 id=treeidlist>80781|81219|135838|134949|141286|145925|141292|145353|134942|135843|138790|</textarea>
<br><input type=button class=bi style=width:70px; onclick=startwater(); value=批量浇水>
<input type=button class=bi style=width:70px; onclick=clearTimeout(h); value="停 止">
<script language=javascript>
var count=0;
var list;
var h=0;
var k;
function startwater()
{
clearTimeout(h);
list=treeidlist.value.split("|");
k=0;
count=list.length;
water();
}
function water()
{
f1.action="http://tree.ci123.com/tree.php?treeid=".concat(list[list.length-count]);
f1.submit.click();
count-=k;
if(count>0)
{
if(k==0)k=1;
else k=0;
h=setTimeout(water,1000);
}
}
</script>
<form action="" name=f1 method=POST target=tree>
<input type=submit name=submit value="" style=display:none>
</form>