请问这段javascript代码是什么意思呢? 我发现网页没有它运行不正常, 但是我不懂这段代码是什么意思.

<scriptlanguage="javascript">varshop={languages:{"ab":"Abkhazian","aa":"Afar","af":"A... <script language="javascript">
var shop = {
languages:{"ab":"Abkhazian","aa":"Afar","af":"Afrikaans","ak":"Akan","sq":"Albanian","am":"Amharic","ar":"Arabic","an":"Aragonese","hy":"Armenian","as":"Assamese","av":"Avaric","ae":"Avestan","ay":"Aymara","az":"Azerbaijani","bm":"Bambara","ba":"Bashkir","eu":"Basque","be":"Belarusian","bn":"Bengali","bh":"Bihari","bi":"Bislama","bs":"Bosnian","br":"Breton","bg":"Bulgarian","my":"Burmese","ca":"Catalan","km":"Central Khmer","ch":"Chamorro","ce":"Chechen","ny":"Chichewa","zh":"Chinese","cu"},
proto:"http://",
domain:"test.com",
promo:false,
lang:{"total":"Total","languagesavailable":"Languages Available","selectlanguage":"Select Language","for":"For","addtocart":"Add to Cart","cancel":"Cancel","update":"Update","continue":"Continue","formfieldrequired":"This field is required","forminvalidemail":"Invalid e-mail address supplied","forminvalidnumber":"Invalid number supplied","formvaluetooshort":"Value is too short"}
};
</script>
请问这段javascript代码是什么意思呢? 我发现网页没有它运行不正常, 但是我不懂这段代码是什么意思.
请给解释一下, 谢谢
展开
 我来答
29cyy
推荐于2016-02-16 · TA获得超过2186个赞
知道小有建树答主
回答量:2826
采纳率:45%
帮助的人:587万
展开全部
定义了一个js对象 叫shop 有几个属性 languages、proto、domain、promo、lang

其中
languages应该是语言 这个属性的值是 一个json数组"ab":"Abkhazian" 这一个代表一种语言前边是简称后边是全称。它也可以转换为js对象转换后,ab为属性名 Abkhazian为属性值
proto应该是协议,属性值是http://
domain应该域名,属性值是test.com
promo好像是代理吧,属性值为false 应该是没使用代理
lang也是应该是语言的意思,属性值为json数组,但没太看懂,可能是常用短语吧
百度网友5b1435d
2014-11-27 · TA获得超过203个赞
知道小有建树答主
回答量:259
采纳率:100%
帮助的人:105万
展开全部
shop是一个对象,属性有languages,proto,domain,promo,lang。

languages属性值又是一个对象。

{“” :""}标识对象的字段和值,中间用冒号隔开,对字段用逗号隔开;
如:{a:“aaaaa”,b :false , c : 12 ,...}
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式