<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Web 多线程示例</title>
    <link href="Style.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript" src="jquery-1.3.2.min.js"></script>
    <script language="javascript" type="text/javascript">
    <!--
    function Start(){
        $.ajax({
            type: "GET",
            url: "Handler.ashx?Command=Start",
            success: function(msg){
                window.alert("Thread Start: " + msg);
            }
        });
    }
    function Abort(){
        $.ajax({
            type: "GET",
            url: "Handler.ashx?Command=Abort",
            success: function(msg){
                window.alert("Thread Abort: " + msg);
            }
        });
    }
    function Status(){
        $.ajax({
            type: "GET",
            url: "Handler.ashx?Command=Status",
            success: function(msg){
                $("#Status").html("Thread Status: " + msg);
            }
        });
    }
    window.onload = function(){
        Status();
        window.setInterval(Status, 1000);
    }
    -->
    </script>
</head>
<body>
    <h3>Chukeh.Data 小诸葛 - Web 多线程操作示例</h3>
    <div>
        <fieldset>
            <legend>多线程操作示例</legend>
            <div id="Status"></div>
            <div>
                <button id="Start" name="Start" onclick="Start();">启动线程</button>
                <button id="Abort" name="Abort" onclick="Abort();">终止线程</button>
            </div>
        </fieldset>
    </div>
</body>
</html>
