javascript函数
来源:互联网 发布:淘宝爆款0销量打造方法 编辑:程序博客网 时间:2024/06/18 18:47
getDay()获取一周中的某一天(0---6)
getYear()获取年
getFullYear()完整的四位年
getMonth()获取的是月份(0---11)
getDate()获取月吵的某一天(1---31)
indexOf() 查找子字符串() substr()字符串的截取,
toLowerCase()把字符串转换为小写
random()产生0到1之间的随机小数
Math.round()
产生m--n之间的整数;
math.round(Math.random()*(n-m)+m)
在网页中弹出一个广告:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>弹出一个广告</title>
<script language="javascript" type="text/javascript">
function openAdv(){
var w=window.open("http://www.baidu.com","百度","heigth=800,width=1000,location=no,resizable=0,status=0,toolbar=0");
w.moveTo(100,100);
}
</script>
</head>
<body>
<a onclick="openAdv()">淘宝</a>
</body>
</html>
- javascript函数
- Javascript函数
- Javascript函数
- javascript函数
- javascript函数
- javascript函数
- JavaScript函数
- JavaScript 函数
- JavaScript 函数
- JavaScript函数
- javascript函数
- javascript函数
- javascript函数
- JavaScript 函数
- javascript函数
- javascript 函数
- javascript函数
- javascript函数
- 可以让你少奋斗10年的工作经验
- 可以让你少奋斗十年的经典
- css+js实现选项卡
- android之 控件常用的属性
- C#调用外部DLL
- javascript函数
- javascript功能
- 使用Java构造高可扩展应用(1)
- 使用纯代码的界面程序
- 两张表查询
- 如何根据SDK新建泰泽项目
- 记录生活的点滴,从这里开始,从今天开始
- 圆角边框,兼容性很好~【收藏】
- 《编程之美》读书笔记: 3.3 计算字符串的相似度