- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
ASCII码和焦点的获取(Access to ASCII and focus)
ASCII码和焦点的获取(Access to ASCII and focus)
1. Custom objects:
Object class creates objects
Javascript built-in objects:
String object
abcdef
01234
All characters are represented by ASCII code in the computer
A - - 65
A - 97
Question: how do you get the characters ASCII equivalent in the computer
The use of character Ascii
1. Convert characters to ASCII.
In javascript, use the string objects charCodeAt () to convert the specified characters into ASCII.
CharCodeAt () : returns an integer representing the Unicode encoding of the character in the specified location.
Grammar: var c = strobj.charcodeat (index); Index specifies the index to be converted into ASCII characters, and c will get the character conversion ASCII.
Example:
Tx = ABC;
Var = ii tx. CharCodeAt (0); / / only convert the 0 index corresponding to the character of ABC to ASCII.
Alert (ii);
HTML
head title HTML markup format / title / head
The body
h2 HTML markup format / h2
The hr
script language = JavaScript
Var s = ABC;
/ *
Var b = s.c harCodeAt (1);
Alert (b);
* /
For (I = 0; I s.l ength; i++)
{
Var b = s.c harCodeAt (I);
Alert (b);
}
/ script
The / body
The / HTML
Converts Numbers as ASCII to characters
FromCharCode method: converts the parameters given to characters and returns them.
Example:
Var test = string.fromcharcode (number); / / convert Numbers as ASCII to characters.
Example:
HTML
head / title / head
The body
h2 HTML markup format / h2
The hr
script language = JavaScript
Var a = 99;
Var b = String. FromCharCode (a);
Alert (b);
/ script
The / body
The / HTML
Homework:
Converts the string entered in the text box into the encrypted content, and the conversion back to the original string
Requirements:
1. Use the function to encrypt the text box content
2. Use function to restore the text box content.
Knowledge:
1. The encryption:
A - b
1. A - - 97
2. 97 + 1 = 98
(3), 98 - b
Example:
script language = javascript
The function jiami (obj)
{
Text
您可能关注的文档
- 2009年普通高等学校夏季招生考试(上海卷)(2009 summer recruitment examination (Shanghai)).doc
- 材料力学视频教学(全62集)--天津大学(Materials mechanics video teaching (all 62) - tianjin university).doc
- 材料加工(Material processing).doc
- 材料成型工艺基础(Foundation of material forming process).doc
- 材料科学基础名词解释(Basic terms of material science).doc
- 材质合金 款式时尚夸张,很具现代感,适合派对,泡吧 这么便宜的价格(Material the alloy style is fashionable exaggerated, very contemporary sense, suit party, bubble bar so cheap price).doc
- 标点符号用法(punctuation).doc
- 标点练习(Punctuation practice).doc
- 步进电机14问(The step motor 14 asks).doc
- 步进电机常识与步进电机的选购doc(Step into motor common sense and step motor).doc
- asdassadsad(asdassadsad).doc
- asx文件解释(Asx document interpretation).doc
- ass速算法(Along simplified method).doc
- ATMEGA8的熔丝位说明(The fuse bit description of ATMEGA8).doc
- at89c51单片机对应高低电平的电压值(The at89c51 unit corresponds to the voltage of the high and low level).doc
- at89c51电路(At89c51 circuit).doc
- AutoCAD 2002 完全使用手册(DOC) ch16_ok(AutoCAD 2002 complete use manual (DOC) ch16_ok).doc
- autocad三维转二维方法(Autocad 3d transformation method).doc
- AUTOCAD线型规定(AUTOCAD rules).doc
- AVR控制矩阵键盘,12864显示简单计算器(AVR control matrix keyboard, 12864 display simple calculator).doc
最近下载
- 生活垃圾清运转运及转运站运营方案(投标方案).docx
- 质量理念培训.pptx VIP
- 2025年国家执业药师考试《中药一》常用中药材彩图(第七版 高清图片) .pdf VIP
- 汽车四轮定位参数.课件.ppt VIP
- 24黄梅小调打猪草二胡民乐合奏谱简谱.pdf VIP
- CRH380AL型动车组一级修作业指导书.pdf VIP
- 城市更新技术谱系.docx VIP
- 某集团人力资源部2025年度考核指标方案(精品).docx VIP
- 学校美育建设调研报告修订稿.docx VIP
- Unit 1 You and ME Section A 课件+嵌入音频(共22张PPT) 人教版(2025)七年级英语上册.pptx VIP
文档评论(0)