start input.asp
1 thenum= request("num")
1<style type="text/css">
2<!--
3.trees { border-color: black black black #666666; padding-left: 12px; border-style: solid; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 3px; margin-top: 2px; margin-bottom: 2px}
4\-->
5</style>
1<div class="trees" id="tree```
2=thenum
3```">```
4=thenum
5```<span id="follow```
6=thenum
7```"><iframe name="agent```
8=thenum
9```" src="prime_number.asp?num=```
10=thenum
11```" style="display:none"></iframe></span></div>
end input.asp
start prime_number.asp
1
2IsPrimeNumber = false
3thenum = request("num")
4if thenum = 2 or thenum = 1 then
5IsPrimeNumber = false
6else
7for i = 2 to thenum -1
8if thenum / i = int(thenum / i) then IsPrimeNumber = true: m = i : exit for
9next
10end if
11if IsPrimeNumber = false then
1<script>
2var htmltext = '<div class = "trees">```
3=thenum
4```*</div>';
5parent.follow```
6=thenum
7```.innerHTML = htmltext;
8</script>
1else
1k = thenum / m
1<script>
2var htmltext = '<div class = "trees">```
3=m
4```*</div><div class = "trees" id="tree```
5=k
6```">```
7=k
8```<span id="follow```
9=k
10```"><iframe name = "agent```
11=k
12```" style="display:none" src="prime_number.asp?num=```
13=k
14```"></iframe></span></div>';
15parent.follow```
16=thenum
17```.innerHTML = htmltext;
18</script>
1end if
end prime_number.asp
算法应用:分布多线程树读取