Created
March 4, 2011 07:26
-
-
Save taka2/854301 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%@ Language = "VBScript" %> | |
| <html> | |
| <head> | |
| <meta http-equiv = "Content-Type" content = "text/html; charset = Shift_JIS"> | |
| <title>VBScript Ajax Test</title> | |
| <script language = "VBScript"> | |
| Dim xhr | |
| Sub btn1_onclick() | |
| Set xhr = CreateObject("Microsoft.XMLHTTP") | |
| xhr.open "GET", "/test.asp", true | |
| xhr.onreadystatechange = GetRef("handler") | |
| xhr.send | |
| End Sub | |
| Sub handler() | |
| If xhr.readystate = 4 Then | |
| document.getElementById("result").innerHtml = xhr.responseText | |
| End If | |
| End Sub | |
| </script> | |
| </head> | |
| <body> | |
| <form name = "form1"> | |
| <input type = "button" id = "button1" name = "btn1" value = "ボタン"> | |
| <span id = "result"></span> | |
| </form> | |
| </body> | |
| </html> | |
| <!-- | |
| test.aspの中身は以下の通り。 | |
| <%@ Language = "VBScript" %> | |
| <% | |
| Response.Write("hoge") | |
| %> | |
| --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment