由于ie中绑定事件的bug,所以产生了用原生的实践操作来模拟事件绑定的方法,跟着李炎恢学的一招。 function addEvent(obj, type, fn){ if(obj.addEventListener){ obj.addEventListener(type, fn, false); }e ...
分类:
Web程序 时间:
2016-08-26 22:47:03
阅读次数:
146
函数:完成某项特定的功能。 函数的四要素:名称、输入、返回值、加工。 定义函数:function(定义) 函数的名字(形参){ 函数体(加工)} 文本框加 按钮(调用) 例如:输入一个年份判断是否是闰年 ...
分类:
编程语言 时间:
2016-08-26 22:42:28
阅读次数:
212
Javascript常用代码大全 //打开模式对话框 <body><script language=javascript> function doSelectUser(txtId){ strFeatures="dialogWidth=500px;dialogHeight=360px;center=y ...
分类:
Web程序 时间:
2016-08-26 21:27:51
阅读次数:
218
通过创建一个自调用匿名函数,创建一个特殊的函数作用域,该作用域中的代码不会和已有的同名函数、方法和变量以及第三方库冲突。 自调用匿名函数写法 方法一: (function(){ //... })(); 方法二: (function(){ //... }()); 方法三: !function(){ / ...
分类:
Web程序 时间:
2016-08-26 21:18:42
阅读次数:
180
1.angular.module('app',['mePagination']) .controller('myController',['$scope',function($scope){ $scope.myPage={ currentPage:1,//访问第几页数据,从1开始 totalItem ...
分类:
Web程序 时间:
2016-08-26 21:16:54
阅读次数:
553
1.屏幕旋转的事件和样式 事件 window.orientation,取值:正负90表示横屏模式、0和180表现为竖屏模式; window.onorientationchange = function(){ switch(window.orientation){ case -90: case 90: ...
分类:
移动开发 时间:
2016-08-26 21:11:38
阅读次数:
169
/** * * 生存hashCode * */function hashCode($str){ if(empty($str)) return ''; $str = strtoupper($str); $mdv = md5($str); $mdv1 = substr($mdv,0,16); $mdv2 ...
分类:
Web程序 时间:
2016-08-26 18:26:28
阅读次数:
187
MSDN如是说:The LockWindowUpdate function disables or enables drawing in the specified window. Only one window can be locked at a time. BOOL LockWindowUpd ...
设置grid属性 fixedCellHeight:false rowAttrRender: function (rowdata,rowid) { if(typeof(rowdata.value)=="string") { if(rowdata.value.indexOf('<img')>=0) { ...
分类:
其他好文 时间:
2016-08-26 18:08:58
阅读次数:
677
/**
*DetermineifthecurrentrequestURLandquerystringmatchesapattern.
*
*@parammixedstring
*@returnbool
*/
publicfunctionfullUrlIs()
{//checkstringlikeURL
$url=$this->fullUrl();
foreach(func_get_args()as$pattern){
if(Str::is($pattern,$url)){
returntrue;
}
..
分类:
Web程序 时间:
2016-08-26 15:50:37
阅读次数:
224