Revision 373730663563 () - Diff

Link to this snippet: https://friendpaste.com/2ze8Z4V9aDywcVqs9NPKae
Embed:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<META name="GENERATOR" content="qwert">
<META http-equiv="Content-Style-Type" content="text/css">
<SCRIPT LANGUAGE=VBSCRIPT>
Sub Hoge_Click(FilePath)
Dim log
Set log = document.getElementById("log")
log.innerHTML = ""
Const ForReading = 1

Dim List
Set List = Nothing
Dim FileSystem
Set FileSystem = CreateObject("Scripting.FileSystemObject")
Dim TextStream
Set TextStream = FileSystem.OpenTextFile(FilePath, ForReading)
Do Until TextStream.AtEndOfStream
Set List = New ClassList.Init(TextStream.ReadLine(), List)
Loop
Do Until List Is Nothing
log.innerHTML = log.innerHTML & List.Value & "<BR>"
Set List = List.NextList
Loop
End Sub

Class ClassList
Public Value
Public NextList
Public Function Init(Value_, NextList_)
Value = Value_
Set NextList = NextList_
Set Init = Me
End Function
End Class
</SCRIPT>
<STYLE>
P { color : blue; cursor : pointer }
</STYLE>
<TITLE></TITLE>
</HEAD>
<BODY>
<DIV style="float:left">
<P class="clickable" onclick='Hoge_Click("hoge.log")'>hoge</P>
<P class="clickable" onclick='Hoge_Click("piyo.log")'>piyo</P>
</DIV>
<DIV id="log" style="margin-left:3em"></DIV>
</BODY>
</HTML>