网站大量收购独家精品文档,联系QQ:2885784924

javascript就这么回事 (js基础学问整理).docx

javascript就这么回事 (js基础学问整理).docx

  1. 1、本文档共20页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
javascript就这么回事 (js基础学问整理)

1 创建脚本块引用内容程序代码script language=”JavaScript”JavaScript 代码写在这里面/script2 隐藏脚本代码引用内容程序代码script language=”JavaScript”!--document.write(“Hello”);// --/script在不支持JavaScript的浏览器中将不执行相关代码3 浏览器不支持的时候显示引用内容程序代码noscriptHello to the non-JavaScript browser./noscript4 链接外部脚本文件引用内容程序代码script language=”JavaScript”src=/”filename.js”/script5 注释脚本引用内容程序代码// This is a commentdocument.write(“Hello”); // This is a comment/*All of thisis a comment*/6 输出到浏览器引用内容程序代码document.write(“strongHello/strong”);7 定义变量引用内容程序代码varmyVariable = “some value”;8 字符串相加引用内容程序代码varmyString = “String1” + “String2”;9 字符串有哪些信誉好的足球投注网站引用内容程序代码script language=”JavaScript”!--varmyVariable = “Hello there”;vartherePlace = myVariable.search(“there”);document.write(therePlace);// --/script10 字符串替换引用内容程序代码thisVar.replace(“Monday”,”Friday”);11 格式化字串引用内容程序代码script language=”JavaScript”!--varmyVariable = “Hello there”;document.write(myVariable.big() + “br”);document.write(myVariable.blink() + “br”);document.write(myVariable.bold() + “br”);document.write(myVariable.fixed() + “br”);document.write(myVariable.fontcolor(“red”) + “br”);document.write(myVariable.fontsize(“18pt”) + “br”);document.write(myVariable.italics() + “br”);document.write(myVariable.small() + “br”);document.write(myVariable.strike() + “br”);document.write(myVariable.sub() + “br”);document.write(myVariable.sup() + “br”);document.write(myVariable.toLowerCase() + “br”);document.write(myVariable.toUpperCase() + “br”);varfirstString = “My String”;varfinalString = firstString.bold().toLowerCase().fontcolor(“red”);// --/script12 创建数组引用内容程序代码script language=”JavaScript”!--varmyArray = new Array(5);myArray[0] = “First Entry”;myArray[1] = “Second Entry”;myArray[2] = “Third Entry”;myArray[3] = “Fourth Entry”;myArray[4] = “Fifth Entry”;varanotherArray = new Array(“First Entry”,”SecondEntry”,”ThirdEntry”,”FourthEntry”,”Fifth Entry”);// --/script13 数组排序引用内容程序代码script language=”JavaScript”!--varmyArray = new Array(5);myArray[0] = “z”;myArray[1] = “c”;myArray[2] = “d”;myArray[3] = “a”

文档评论(0)

my18 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档