Jquery fails to modify the page title and other JavaScript files. jquery title titlejs
Jquery code
Later, I had to use the following js Code to implement it.
Js Code
Zookeeper
How does js call the current page address and the title in <title> get it?
<Script language = "JavaScript">
{
Document. write (document. title)
}
</Script>
This is the same as jquery that calls the title of the current page using JS. You have met the call address.
Js or jquery get the title of the previous page
If you are switching from A to B, the DOM of page A has been released and page B cannot be accessed. If you want to read the content of page, you can only retrieve page A from the server through Ajax, and then extract the content between the TITLE tags from the source code of page A through regular expressions.
Alternatively, there is A simple way to add A piece of JS to page A, write your TITLE into the Cookie, and retrieve this value from the Cookie on page B, which is much easier.
It is also A way to pass the TITLE of A to B through the URL parameter.