打印本文 打印本文 关闭窗口 关闭窗口
一个简单的投票机器人
作者:武汉SEO闵涛  文章来源:敏韬网  点击数2631  更新时间:2009/4/23 18:34:20  文章录入:mintao  责任编辑:mintao
      checklist2[2]:=true;

 

   if checklist2[2] then

       part2:=(10-num1)-1

   else part2:=(10-num1);

  

   while (part2 > 0 ) do

       begin

           who := Random(23)+1;

           for j:=1 to 23 do

             begin

                 if checklist2[who]  then //

                     break

                 else

                   begin

                       checklist2[who]:=true;

                       part2:=part2-1;

                   end;

             end;

       end;

 

   for j:=1 to 23 do

       begin

                   if checklist1[j] then

                       begin

                           liststr1:=liststr1+checkedlist1[j];

                           checkNum1:=checkNum1+inttostr(j)+'''','''';

 

                       end

                   else liststr1:=liststr1+uncheckedlist1[j];

 

                   if checklist2[j] then

                       begin

                           liststr2:=liststr2+checkedlist2[j];

                           checkNum2:=checkNum2+inttostr(j)+'''','''';

 

                       end

                   else liststr2:=liststr2+uncheckedlist2[j];

       end;

   RichEdit1.Lines.Add(''''第''''+inttostr((times div 2)+1)+''''次投票结果:'''');

   RichEdit1.Lines.Add(''''第一组选中序号(''''+inttostr(num1)+''''个):''''+checkNum1);

   RichEdit1.Lines.Add(''''第二组选中序号(''''+inttostr((10-num1))+''''个):''''+checkNum2);

 

            htmlbody:=htmlbody+liststr2;

       htmlbody:=htmlbody+''''<INPUT TYPE=hidden NAME="CHOICE  2" VALUE="23"><TR bgcolor="#E7E8E3" bordercolor="#FFFFFF"><TD bgcolor="#CCCCCC"><TD ALIGN=center><INPUT name="sub" TYPE=submit VALUE="提交"></TABLE></FORM></BODY></HTML>'''';

    

end;

把生成的HTML载入Webbrowser,生成网页

表格 2

procedure TFrmMain.loadHtml;

var

上一页  [1] [2] [3] [4]  下一页

打印本文 打印本文 关闭窗口 关闭窗口