shahin
Active Member
Is there any way to kick out "script" tag and it's content from some html elements? I am pasting below the html elements containing the script tag and it's content along with different elements. All I wish to do is shake off script tag and it's content out of the document and keep the rest. Thanks in advance for any help?
Content I'm trying with:
Code:
Sub Customize_Documents()
With CreateObject("InternetExplorer.Application")
.Visible = False
.navigate "C:\Users\ar\Desktop\content.html"
While .Busy = True Or .readyState < 4: DoEvents: Wend
Debug.Print .document.body.outerHTML
.Quit
End With
End Sub
Content I'm trying with:
Code:
<div id="ea84293f_1215_4896_ba89_78b670296912">
<script>
var strwarn = "Alpha Kappa Alpha Sorority, Incorporated is not responsible for the content on chapter Websites.";
</script>
<h1>Alpha Alpha Omega</h1>
<br>
<h3>Address:</h3>
<script>
var website="http://www.akapittsburghaao.net";
if (website!="" && website.substring(0,4)!="http") website="http://" + website;
if ("P. O. BOX 5044"!="") document.write("P. O. BOX 5044<br/>");
if (""!="") document.write("<br/>");
if (""!="") document.write("<br/>");
document.write("PITTSBURGH, PA 15206<br/>");
if ("UNITED STATES"!="" && "UNITED STATES"!="UNITED STATES") document.write("UNITED STATES<br />");
if (website!="") document.write("<a onclick='alert(\""+strwarn+"\");' href='"+website+"' target=_blank>"+website+"</a>");
if ("Rhonda Taliaferro"!="") document.write("<h3>Primary Contact:</h3>Rhonda Taliaferro<br/>");
if ("rhondalt@verizon.net"!="") document.write("<a href='mailto:rhondalt@verizon.net'>rhondalt@verizon.net</a><br/>");
</script>
P. O. BOX 5044<br>PITTSBURGH, PA 15206<br>
<a onclick='alert("Alpha Kappa Alpha Sorority, Incorporated is not responsible for the content on chapter Websites.");' href="http://www.akapittsburghaao.net" target="_blank">http://www.akapittsburghaao.net</a>
<h3>Primary Contact:</h3>Rhonda Taliaferro<br>
<a href="mailto:rhondalt@verizon.net">rhondalt@verizon.net</a>
<br>
</div>