javascript link to another page
window.location.href = "http://mywebsite.com/home.html";
javascript link to another page
window.location.href = "http://mywebsite.com/home.html";
javascript get all script tags on page
var scripts = document.getElementsByTagName("script");
for (var i = 0; i < scripts.length; i++) {
if (scripts[i].src) {
console.log(i, scripts[i].src);
} else {
console.log(i, scripts[i].innerHTML);
}
}
html a link to section on page
<!--1. create link tag with href containing "[#][section to direct] with name-->
<a href = #about-section>About</a>
<!--2. create identifier for the section you would like to navigate to with "id" = name-->
<section id = "about-section"> <h1>This is the about section</h1> </section>
link to section on page html
<!-- #top is the ID of the div where u wanna link to -->
<a href="#top">Go back to the top!</a>
<div id="top"></div>
how to redirect to another page in javascript on submit type
<script type="text/javascript" language="javascript">
function redirect()
{
window.location.href="login.php";
}
</script>
<form name="form1" id="form1" method="post">
<input type="submit" class="button4" name="order"
id="order" value="Place Order" onclick="redirect();" >
</form>
html link to other part of the page
<h1><a href="#belowtext">Title here xD</a></h1>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<p id="belowtext">Your below text appears here when you click on the text above me you will be redirected to here</p>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us