<html><head> <script type="text/vbscript"> dim objxml function go_onclick() dim content set objxml = createobject("msxml2.xmlhttp") objxml.open "get", "http://www.google.fr/search?hl=fr&q=toto", false objxml.send content = objxml.responsetext content = replace(content, "<", "<") content = replace(content, ">", ">") content = "" & content & " " document.getelementbyid("result").innerhtml = content end function </script> <head/> </html>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question<script type= "text/vbscript">
dim objxml dim content set objxml = createobject("msxml2.xmlhttp") objxml.open "get", "http://www.google.fr/search?hl=fr&q=toto", false objxml.send content = objxml.responsetext WScript.Echo content
dim objxml dim content Dim starting Dim ending Dim inTag Dim result Dim currentChar Dim i set objxml = createobject("msxml2.xmlhttp") objxml.open "get", "http://www.google.fr/search?hl=fr&q=toto", false objxml.send content = objxml.responsetext ' On ne conserve que le body starting = InStr(content, "") content = Mid(content, ending + 1) ' On prend que ce qu'il y a hors des balises inTag = False result = "" For i = 1 To Len(content) currentChar = Mid(content, i, 1) If currentChar "<" Then inTag True If Not inTag Then result = result & currentChar If currentChar = ">" Then inTag = False result = result & " " End If Next WScript.Echo result