JavaScript basics
JavaScript forwarding syntax
There are many web forwarding techniques. We have previously shared a method of using HTML <meta> tags (please refer to this article: HTML forwarding syntax ). This article is about how to make a web forwarding through JavaScript's location syntax. , Please see the following example.
JavaScript forwarding syntax example
<script language="javascript">document.location.href="URL to go to";</script>
The difference between this example and HTML's <meta> tag forwarding method is that it does not have to be placed between the <head></head> tags, but can be placed anywhere in the web page, but if there are other Executing the grammar may affect the execution of forwarding, so if the web page needs to be forwarded directly, put the grammar a little earlier!
Post a Comment
0 Comments