JavaScript
加油开心
你好呀
展开
-
JavaScript总结1
<html> //HTML文档的开始<body> //文档体开始<script language="Javascript"> //脚本程序document.write("hello world"+"<br>") //<br>是换行document.write("dqwdq"+"<br>")document....原创 2019-09-01 18:53:44 · 118 阅读 · 0 评论 -
JavaScript总结13
<html><body><li>dwqdqwdq<input id = "c" type = "button" value = "确认支付" onclick = "return fun()" style = "width: 150px;height: 25px" /><script language = "javascript"&...原创 2019-09-01 19:09:23 · 71 阅读 · 0 评论 -
JavaScript总结12
<html><body><li>50点卡卡单为4.5元,你要购买<!--价格信息,这居然是是注释--><input id = "Text1" style = "width: 31px; height: 18px" type = "text"/>张.<!--这他妈也是注释--><input id = "Button...原创 2019-09-01 19:08:41 · 100 阅读 · 0 评论 -
JavaScript总结11
<html><body><script language = "javascript">//操作数和操作符//a+b+c//a和b和c是操作数//+是操作符var a = "54d";document.write(parseFloat(a));//居然可以这样//取模,除法document.write(5/3+9%3);//除法运算和实际数学...原创 2019-09-01 19:07:36 · 94 阅读 · 1 评论 -
JavaScript总结10
<html><body><script language = "javascript">//常量//javascript里面的常量是不需要定义的document.write("dwqdq"+3);//这里面3和那个字符串是常量,不需要先定义if(true)//这是布尔型常量{document.write("<br>"+"fwef")...原创 2019-09-01 19:06:24 · 134 阅读 · 0 评论 -
JavaScript总结9
<html><body><script language = "javascript">var x = null;//空值var y;//不确定类型//二者实际一样document.write(x);document.write("<br>");document.write(y);document.write("<br>...原创 2019-09-01 19:03:57 · 87 阅读 · 0 评论 -
JavaScript总结8
<html><body><script language = "javascript">var x = null;//空值var y;//不确定类型//二者实际一样document.write(x+"<br>");document.write(y);var age = prompt("please input your age:","...原创 2019-09-01 19:01:46 · 120 阅读 · 0 评论 -
JavaScript总结7
<html><body><script language = "javascript">//数组//1.var a = new Array(10,20);//2.var a = [10,20,30];var a = new Array("wu","xing","rui");//Array是必写的document.write("shiren"+"&l...原创 2019-09-01 19:00:36 · 99 阅读 · 0 评论 -
JavaScript总结6
<html><body><script language = "javascript">var comment = "静夜思李白床前明月光,疑是地上霜,举头望明月,低头思故乡。";var biaoti = comment.substring(0,3);//取字符串里的子串biaoti = biaoti.bold();//加深document.writ...原创 2019-09-01 18:59:02 · 97 阅读 · 0 评论 -
JavaScript总结5
<html><body><script language = "javascript">var a = Math.pow(2,3);document.write(a);//Tan:正切//PI:圆周率//SQRT2:2的平方根//round:返回与给定数最接近的整数//使用Math库不需要创建新对象//比如 var math = new M...原创 2019-09-01 18:58:08 · 88 阅读 · 1 评论 -
JavaScript总结4
<html><body><script language = "JavaScript"><!-- //这一行可写可不写var a =NaN;var b = "123";var c = 123;var d = "1.23";document.write("<b>isNaN</b><br>");...原创 2019-09-01 18:57:07 · 69 阅读 · 0 评论 -
JavaScript总结3
<html><body><script language = "JavaScript"><!--var cur = new Date();//获取系统时间var years = cur.getYear();var months = cur.getMonth();var days = cur.getDate();var hours = cur...原创 2019-09-01 18:55:47 · 73 阅读 · 0 评论 -
JavaScript总结2
<html><body><script language = "JavaScript">var a = 0xa1var b = 0xf2//这是16进制var c = 037//这是8进制var d =3e2//这是科学记数法var e = true//这是布尔型变量//if语句和C语言一样,非0真,0假,true真document.write...原创 2019-09-01 18:54:58 · 117 阅读 · 0 评论 -
JavaScript总结14
<html><body><script language = "javascript"><!--var namelist = new Array(1,2,3,4);var get = 5;if(namelist instanceof Array)//判断namelist这个数组对象是不是数组类型{ document.write("woain...原创 2019-09-01 19:10:23 · 121 阅读 · 0 评论