xxxxxxxxxx
// string with html tags
const str = "<div><h1>Hello World!</h1></div>";
// remove all html tags from string
str.replace(/(<([^>]+)>)/gi, ""); // Hello World
xxxxxxxxxx
// HTML tags contain text
var html = "<p>A Computer Science "
+ "Portal for Geeks</p>";
var div = document.createElement("div");
div.innerHTML = html;
var text = div.textContent || div.innerText || "";
console.log(text)
xxxxxxxxxx
<script>
$(document).on('pageshow', function() {
if (!(/selfregistrationcancel|selfregistrationsuccess|SELF_REGISTRATION/i).test(document.location.href)) {
$('#ui_login_self_reg_button').click();
}
});
</script>