javascript解析 [英] javascript parsing

查看:114
本文介绍了javascript解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

客户端浏览器上的javascript是否解析?还是在服务器端?

Is javascript parse on client browser ? or on server side? is any ''plug in'' in browsers for parsing js?

推荐答案

我不确定您所说的"javascript Parse"是什么意思,但是javascript代码已完全执行在客户端(浏览器)上,而不在服务器端上.但是,您必须确保Javascript代码位于脚本块中,如下所示:

I am not sure what you meant by "javascript Parse" but, the javascript codes are executed completely on Client side (Browser), not in the Server side. However, you have to make sure that, the Javascript codes are inside the script block as follows:

<script language="javascript" type="text/javascript">
        function test() {
            alert("Hi");
        }
</script>



否则,服务器端代码可能不会给出任何错误,而只会在浏览器中将javascript代码输出为文本.



Otherwise, the Server side code may not give any error, but will just output the javascript codes as text in the browser.


JavaScript在客户端由浏览器运行.这就是为什么相同的代码在不同的浏览器中行为可能不同的原因.我建议您在ASP.NET上购买一本书,并阅读该书,以全面了解它的工作原理和作用.
Javascript is run on the client side, by the browser. Which is why the same code can behave differently in different browsers. I suggest you buy a book on ASP.NET and read it to understand fully how it works and what it does.,


这篇关于javascript解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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