1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
$oIE=new-object -com internetexplorer.application $oIE.navigate2("About:blank") while ($oIE.busy) { sleep -milliseconds 50 } $oIE.visible=$true $params=[String]' <html> <head> <script> function funcion(){document.getElementById("cambiar").innerHTML = "Cambiar texto";} </script> </head> <body> <h1>Web cambiar texto</h1> <p id="cambiar">Texto sin cambiar</p> </body> </html>' $oIE.document.write($params) Start-Sleep -Seconds 10 $oIE.document.write("<script>funcion()</script>") |