This article describes the simple implementation of JS to prohibit access to a certain page. Share it for your reference, as follows:
Sometimes it is necessary to prohibit some pages from being accessed and jump to other pages. Some reference codes are provided here.
<!DOCTYPE html><html lang="zh-cn"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no"><title>Unable access to a certain page</title><script>window.location.href = '//www.VeVB.COM/';document.writeln("<style>html,body{overflow: hidden !important; width: 100%; height: 100%; padding: 0; margin: 0;}.global-shade{background: #FFFFF !important; width: 100%; height: 100%; z-index: 2147483647999 !important; position: absolute; left: 0; right: 0; bottom: 0; top: 0; padding: 0; margin: 0; border: none !important;}</style><div class=/"global-shade/"></div><iframe class=/"global-shade/"></iframe>");</script></head><body><p>Who can you read? The water falls and the fragrance floats. </p></body></html>For more information about JavaScript related content, please check out the topics of this site: "Summary of JavaScript switching effects and techniques", "Summary of JavaScript search algorithm skills", "Summary of JavaScript animation effects and techniques", "Summary of JavaScript errors and debugging techniques", "Summary of JavaScript data structures and algorithm skills", "Summary of JavaScript traversal algorithms and techniques", and "Summary of JavaScript mathematical operations usage"
I hope this article will be helpful to everyone's JavaScript programming.