gpt4 book ai didi

javascript - 是否可以在查看 html 源代码时隐藏包含部分

转载 作者:太空宇宙 更新时间:2023-11-03 19:39:03 25 4
gpt4 key购买 nike

我在这个论坛上搜索了很多来隐藏 View 源中的一些信息,比如脚本包含和 css,我没有找到任何可行的解决方案

这就是我在我的 php 脚本中所做的

     <html>
<head><?php include('mylibrary/my_include.php');?></head>

<body>
<div></div>
</body>

</html>

在源代码中我是这样的

<html>
<head>
<!-- My function -->
<script type='text/javascript' src='Library/My_fun.js'></script>

<!-- Index -->
<link type="text/css" rel="stylesheet" href="Index/Index.css" />
<link type="text/css" rel="stylesheet" href="JS/jquery-ui.css" />
</head>

<body>
<div></div>
</body>

</html>

我想在 'mylibrary/my_include.php' 中的 View 源中隐藏 js 和 css,是否可以这样做?或仅在 viewsource 或任何其他

中显示以下内容的任何替代解决方案
     <head><?php include('mylibrary/my_include.php');?></head> 

最佳答案

没有。

你不能把东西给浏览器而不给用户。用户控制浏览器,而你没有。

关于javascript - 是否可以在查看 html 源代码时隐藏包含部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22637778/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com