javascript
iteye_19986
这个作者很懒,什么都没留下…
展开
-
JAVASCRIPT 常用的107句话
JAVASCRIPT 常用的107句话 1.document.write(“”); 输出语句2.JS中的注释为//3.传统的HTML文档顺序是:document->html->(head,body)4.一个浏览器窗口中的DOM顺序是:window->(navigator,screen,history,location,document)5.得到表单中元素的名称和值:do...原创 2013-08-01 13:27:44 · 76 阅读 · 0 评论 -
js 字符串截取与数组截取
1.substring处理字符串函数:split() 功能:把一个字符串分割存储到数组函数:join() 功能:将一个数组合并为一个字符串函数:substring() 功能:字符串截取,比如想从"MinidxSearchEngine"中得到"Minidx"就要用到substring(0,6)函数:in...原创 2013-09-11 18:54:54 · 465 阅读 · 0 评论 -
js 当前日期,所属周的日期范围
js 当前日期,所属周的日期范围 function formatDate(date) {var mymonth = date.getMonth()+1;var myweekday = date.getDate();return (mymonth + "月" + myweekday+ "日");}function printWeek() {var now = new...原创 2013-09-23 13:53:41 · 462 阅读 · 0 评论 -
javascript 随机取色
javascript 随机取色 var getRandomColor = function(){ return '#' + (function(color){ return (color += '0123456789abcdef'[Math.floor(Math.random()*16)]) && (color...原创 2013-09-24 18:23:36 · 203 阅读 · 0 评论 -
JS-匿名函数-闭包(function(){})()
javascript 闭包匿名函数var oEvent = {};(function(){var addEvent = function(){};function removeEvent(){}oEvent.addEvent = addEvent;oEvent.removeEvent = removeEvent;})();原创 2013-10-08 15:47:39 · 135 阅读 · 0 评论 -
toString的基本用法,以及理解
默认模式的例子:var num1 = 10;var num2 = 10.0;alert(num1.toString());//输出10alert(num2.toString());//输出10无论你用什么表示法声明数字,默认模式只是按十进制返回。 基模式的例子:(2,8,16进制)var num1 = 10;alert(num1.toString(2));/...原创 2013-10-08 15:47:54 · 248 阅读 · 0 评论 -
HTML 返回历史(学习)
HTML 返回历史(学习) <a href="javascript :;" onClick="javascript :history.back(-1);">返回上一页</a> <input type="button" name="Submit" onclick="javascript:history.back(-1);"原创 2013-10-09 14:11:20 · 263 阅读 · 0 评论