Home > Web Front-end > JS Tutorial > Implementation of webpage cutout based on JavaScript Website title change code_javascript skills

Implementation of webpage cutout based on JavaScript Website title change code_javascript skills

WBOY
Release: 2016-05-16 15:06:49
Original
1491 people have browsed it

Without further ado, I will just post the code for you. The specific code is as follows:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-">
<title>这里是网站标题</title>
</head>
<body>
<script type="text/javascript">
document.body.onfocus = function(){
document.title = '这里是网站标题';
};
document.body.onblur = function(){
 document.title = 'i miss you';
};
</script>
</body>
</html>
Copy after login

The above code is the JavaScript implementation of webpage cutout and website title change code. I hope it will be helpful to everyone!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template