摘要:
//验证url var url=$("#address").val(); var regUrl = /^http[s]{0,1}:\/\/.+$/ ; if(url.match(regUrl)==null){ $.dialog.tips("地址格式不正确!"); ... 阅读全文
摘要:
只有页面全部 渲染结束,才可以调用 插件的方法。正确写法:$(function(){ 插件调用方法。}) 阅读全文
摘要:
PHP案例场景:AJAX调用下面方法:/*** 图片上传*/public function uploadfile(){$result= uploadimg('loopimg');$this->ajaxReturn($result);//echo json_encode($result);}用 ech... 阅读全文
摘要:
按着Ctrl点击方法; 阅读全文
摘要:
'希亚', 'Age'=>20 );$jsonencode = json_encode($arr);echo $jsonencode;?>程序运行结果如下:{"Name":null,"Age":20}json_encode 函数中中文被编码成 null 了,Google... 阅读全文
摘要:
if(brow.msie) // ie浏览器执行此代码 {// data 可以是字符串 eval("data = " + data); } else // 其他浏览器执行此代码 {//data 要求是对象 data = jQuery.parseJSON(jQuery(... 阅读全文
摘要:
大写Y效果:$nowtime = time(); $nowtime=date("Y-m-d",$nowtime);结果: 2015-10-24小写y效果:$nowtime = time();$nowtime=date("Y-m-d",$nowtime);结果: 15-10-24 阅读全文
摘要:
ThinkPHP项目公共方法写在 根目录-> app-> common 里面ThinkPHP模板公共方法卸载 根目录->app->模块名称->common 里面 阅读全文
摘要:
php项目代码 编码格式不对会大范围报错 阅读全文