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
WBOYOriginal
2016-05-16 15:06:491496browse

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>

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

Statement:
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