一起学习网 一起学习网


对js关键字命名的疑问介绍

网络编程 对js关键字命名的疑问介绍 06-21
js对关键字命名我感觉有点乱

有时候是这样:getElementById、indexOf 、charCodeAt、parseFloat、navigator.appName、navigator.appVersion/appCodeName/cookieEnable/userAgent 给人的感觉是单词的首字母大写

有时候又这样:fontsize、fontcolor 给人的感觉是都是小写

但有时候又这样:innerHTML

有没有人能告诉我这其中有没有什么规律啊,我觉得我一段时间不用就会混掉了。在线等答案!

//*****等了10分钟没人回答,那我只好继续add today's content"****************/

accesskey属性

<code class="tag" style="color:green; margin:0px 0.1em; font-size:14px; background-color:transparent"><</code><code class="tag" style="color:green; margin:0px 0.1em; font-size:14px; background-color:transparent">a</code> id='mya' <code class="attr" style="color:blue; margin:0px 0.1em; font-size:14px; background-color:transparent">href</code><code class="tag" style="color:green; margin:0px 0.1em; font-size:14px; background-color:transparent">=</code><code class="attrvalue" style="color:red; margin:0px 0.1em; font-size:14px; background-color:transparent">"</code><code class="attrvalue" style="color:red; margin:0px 0.1em; font-size:14px; background-color:transparent">"</code> <code class="attr" style="color:blue; margin:0px 0.1em; font-size:14px; background-color:transparent">accesskey</code><code class="tag" style="color:green; margin:0px 0.1em; font-size:14px; background-color:transparent">=</code><code class="attrvalue" style="color:red; margin:0px 0.1em; font-size:14px; background-color:transparent">"</code><code class="attrvalue" style="color:red; margin:0px 0.1em; font-size:14px; background-color:transparent">h</code><code class="attrvalue" style="color:red; margin:0px 0.1em; font-size:14px; background-color:transparent">"</code><code class="tag" style="color:green; margin:0px 0.1em; font-size:14px; background-color:transparent">></a></code>

修改或赋值这个属性的Js代码为:document.getElemntById('#mya').accesskey='d';

各种浏览器下accesskey快捷键的使用方法

IE浏览器

按住Alt键,点击accesskey定义的快捷键(焦点将移动到链接),再按回车.

FireFox浏览器

按住Alt+Shift键,点击accesskey定义的快捷键.

Chrome浏览器

按住Alt键,点击accesskey定义的快捷键.

Opera浏览器

按住Shift键,点击esc,出现本页定义的accesskey快捷键列表可供选择.

Safari浏览器

按住Alt键,点击accesskey定义的快捷键.

js对象内部访问this修饰的成员函数示例
用wrapper封装这样在对象内外都可以访问functionMapPool(){functioncreateMarker(name,lat,lng,state){varmarker=newAMap.Marker({position:newAMap.LngLat(lng,lat),});//thefunctionmapMoveToisnot

javascript处理表单示例(javascript提交表单)
处理各种表单,以及链接,按钮的通用组件/***GenericFormprocessingjs*@authorAnthony.chen*//***Pushbuttonaction[btn_action]dataintoform*Ifthereisprescript,runtheprescript*/"usestrict";//All

js分页代码分享
htmlheadmetahttp-equiv="Content-Type"content="text/html;charset=UTF-8"titleInserttitlehere/titlescripttype='text/javascript'src='jQuery.js'/scriptstyletype="text/css"span{width:60px;height:20px;displa


编辑:一起学习网

标签:快捷键,浏览器,定义,表单,给人