摘要: var content //内容var doc = document.getElementById("preview").contentDocument || document.frames["preview"].document;doc.body.innerHTML = content; 阅读全文
posted @ 2018-01-03 11:18 太菜 阅读(1255) 评论(0) 推荐(0) 编辑
摘要: 2**2 //2的二次方 ** php 7中添加 阅读全文
posted @ 2018-01-02 15:24 太菜 阅读(1095) 评论(0) 推荐(0) 编辑
摘要: is_numeric — 检测变量是否为数字或数字字符串 is_scalar — 检测变量是否是一个标量 阅读全文
posted @ 2018-01-02 14:03 太菜 阅读(392) 评论(0) 推荐(0) 编辑
摘要: __LINE__ ;//得到当前行号__FILE__;//当前文件的完整路径(带文件名)__DIR__;//当前文件的路径(不带文件名)__FUNCTION__;//当前函数的名称__CLASS__;//当前类名__METHOD__;//当前类的方法名__TRAIT__; //当前的TRAIT名称_ 阅读全文
posted @ 2018-01-02 13:59 太菜 阅读(159) 评论(0) 推荐(0) 编辑
摘要: if(defined($varName)){//判断常量 echo $varName.':'.constant($varName).'</br>'; //输出常量值} 阅读全文
posted @ 2018-01-02 11:20 太菜 阅读(623) 评论(0) 推荐(0) 编辑
摘要: 1获取删除语句 Select CONCAT( 'drop table ', table_name, ';' ) FROM information_schema.tables Where table_schema=数据库名' table_name LIKE '模糊表名%'; 例子 : 获取mydata 阅读全文
posted @ 2017-11-30 18:17 太菜 阅读(19289) 评论(1) 推荐(1) 编辑
摘要: console.log(screen.availWidth,screen.availHeight);//获取屏幕的宽和高(除 Windows 任务栏之外))console.log(screen.width,screen.height);//获取屏幕的宽和高(包含Windows 任务篮))consol 阅读全文
posted @ 2017-07-18 14:51 太菜 阅读(350) 评论(0) 推荐(0) 编辑
摘要: history.back();//后退一个历史记录相当于 history.go(-1); history.forward();//前进一个历史记录相当于 history.go(1); 阅读全文
posted @ 2017-07-18 14:38 太菜 阅读(179) 评论(0) 推荐(0) 编辑
摘要: location.href ='url' //有历史记录 location.replace=‘url’ //没有历史记录 location.reload() //缓存刷新 ocation.reload(true) 强制刷新 阅读全文
posted @ 2017-07-18 14:32 太菜 阅读(193) 评论(0) 推荐(0) 编辑
摘要: //js date对象常用方法//创建事件对象var now = new Date(); //不传参情况下默认返回当前时间//获取年var y=now.getFullYear();//获取月var m=now.getMonth()+1;//返回0-11//获取日var d= now.getDate( 阅读全文
posted @ 2017-07-17 18:17 太菜 阅读(945) 评论(0) 推荐(0) 编辑