- 1、本文档共20页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
js基础到精通全面教程--JS教程
js基础到精通全面教程--JS教程
适合阅读范围:对JavaScript一无所知~离精通只差一步之遥的人? 基础知识:HTML? JavaScript就这么回事1:基础知识?? 1?创建脚本块? 1:?script?language=”JavaScript”? 2:?JavaScript?code?goes?here? 3:?/script?? 2?隐藏脚本代码? 1:?script?language=”JavaScript”? 2:?!--? 3:?document.write(“Hello”);? 4:?//?--? 5:?/script?? 在不支持JavaScript的浏览器中将不执行相关代码? 3?浏览器不支持的时候显示? 1:?noscript? 2:?Hello?to?the?non-JavaScript?browser.? 3:?/noscript?? 4?链接外部脚本文件? 1:?script?language=”JavaScript”?src=/”filename.js”/script?? 5?注释脚本? 1:?//?This?is?a?comment? 2:?document.write(“Hello”);?//?This?is?a?comment? 3:?/*? 4:?All?of?this? 5:?is?a?comment? 6:?*/?? 6?输出到浏览器? 1:?document.write(“strongHello/strong”);?? 7?定义变量? 1:?var?myVariable?=?“some?value”;?? 8?字符串相加? 1:?var?myString?=?“String1”?+?“String2”;?? 9?字符串有哪些信誉好的足球投注网站? 1:?script?language=”JavaScript”? 2:?!--? 3:?var?myVariable?=?“Hello?there”;? 4:?var?therePlace?=?myVariable.search(“there”);? 5:?document.write(therePlace);? 6:?//?--? 7:?/script?? 10?字符串替换? 1:?thisVar.replace(“Monday”,”Friday”);?? 11?格式化字串? 1:?script?language=”JavaScript”? 2:?!--? 3:?var?myVariable?=?“Hello?there”;? 4:?document.write(myVariable.big()?+?“br”);? 5:?document.write(myVariable.blink()?+?“br”);? 6:?document.write(myVariable.bold()?+?“br”);? 7:?document.write(myVariable.fixed()?+?“br”);? 8:?document.write(myVariable.fontcolor(“red”)?+?“br”);? 9:?document.write(myVariable.fontsize(“18pt”)?+?“br”);? 10:?document.write(myVariable.italics()?+?“br”);? 11:?document.write(myVariable.small()?+?“br”);? 12:?document.write(myVariable.strike()?+?“br”);? 13:?document.write(myVariable.sub()?+?“br”);? 14:?document.write(myVariable.sup()?+?“br”);? 15:?document.write(myVariable.toLowerCase()?+?“br”);? 16:?document.write(myVariable.toUpperCase()?+?“br”);? 17:?? 18:?var?firstString?=?“My?String”;? 19:?var?finalString?=?firstString.bold().toLowerCase().fontcolor(“red”);? 20:?//?--? 21:?/script?? 12?创建数组? 1:?script?language=”Java
文档评论(0)