如何在Blogger中从检查页面元素隐藏JavaScript代码? [英] How to hidden javascript code in Blogger from inspect page element?

查看:77
本文介绍了如何在Blogger中从检查页面元素隐藏JavaScript代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从检查页面元素中隐藏一些JavaScript代码.

I am trying to hide some javascript code from inspect page element.

例如,我的HTML小部件为:

For example I have HTML widget as:

<b:section class='sidebar1' id='sidebartab1' preferred='yes'>
<b:widget id='HTML1' locked='false' title='HTML' type='HTML'>
<b:includable id='main'>
                          <!-- only display title if it's non-empty -->
                          <b:if cond='data:title != &quot;&quot;'>
                            <h2 class='title'>
                              <data:title/>
                            </h2>
                          </b:if>
                          <div class='widget-content'>
                            <data:content/>
                          </div>
                          <b:include name='quickedit'/>
                        </b:includable>
</b:widget>
</b:section>

我的输入内容为:

<script type="text/javascript">
document.write('Hello Stackoverflow');
</script>

输出内容将出现在浏览器上是:

The output content will appear on browser is :

Hello Stackoverflow

但是我仍然看到带有检查元素"的javascript代码.

But I still see javascript code with "inspect element".

那么我如何在Blogger中从检查页面元素中隐藏代码js?

So how can I hidden code js in Blogger from inspect page element?

推荐答案

根本不可能.

您已将脚本元素发送给客户端.该检查器在与您的脚本相同的权限的相同范围内运行.

You've sent a script element to the client. The inspector is running in the same scope with the same permissions as your script.

您可以对其进行模糊处理(如果确实需要).

这篇关于如何在Blogger中从检查页面元素隐藏JavaScript代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆