随笔分类 -  javascript

1
摘要:http://localhost/seajs/index.htmlHello Seajs Hello SeaJShttp://localhost/seajs/app/jquery/jquery.jshttp://localhost/seajs/app/app.jsdef... 阅读全文
posted @ 2015-04-03 17:24 jami918 阅读(247) 评论(0) 推荐(0)
摘要:art 基本示例显示图片外部页面视频询问广告关闭弹出菜单 阅读全文
posted @ 2014-11-25 15:48 jami918 阅读(259) 评论(0) 推荐(0)
摘要:用户名id 用户名 ... 阅读全文
posted @ 2014-06-21 15:26 jami918 阅读(210) 评论(0) 推荐(0)
摘要://一段js代码 var data = {}, act = [], list = []; $('.set').find('inpu... 阅读全文
posted @ 2014-06-11 16:50 jami918 阅读(503) 评论(0) 推荐(0)
摘要:今天需要做图片上传与生成缩略图的功能,把代码进行记录如下:html视图 ($pic_action_url = $this->createAbsoluteUrl('home/upload');) 1 2 3 4 5 6 7 8 9 10 11 1... 阅读全文
posted @ 2014-05-12 17:02 jami918 阅读(1752) 评论(1) 推荐(0)
摘要:1 目录/文件说明: webroot: css: ├─ api.less文档说明css ... 阅读全文
posted @ 2014-04-24 17:13 jami918 阅读(525) 评论(0) 推荐(0)
摘要:Zepto(function($){ var url = $('.page-url').val(); var cur = false; var href_url = $('.page-url').attr('href-url'); $(window).scroll(function(){ if(($(window).scrollTop() + $(window).height() - $(document).height() == 0) ){//判断滚动条是否到达了底部 if(cur ... 阅读全文
posted @ 2014-03-18 11:46 jami918 阅读(317) 评论(0) 推荐(0)
摘要:自己测试的:$a,'b'=>'bbcb');$datab=array('a'=>'aaabb','b'=>'bbbb');echo$callback?$callback."(".json_encode($datac).")":json_encode($datab); UntitledPagephp:'CA1998','price'=>'6000','tickets'=> 阅读全文
posted @ 2014-03-11 10:24 jami918 阅读(204) 评论(0) 推荐(0)
摘要:用谷歌搜索找了很久,发现所有的插件都是功能太复杂,不是我想要的。所以,我决定我自己来实现需要的编辑功能。刚开始我觉得应该要花费很多的时间,因为我想象内容编辑功能应该是很复杂的。 但事实证明,它是如此简单,让我十分惊讶!借助 HTML5 特性,所有的工具都已经可用,所有你需要做的只是配合他们编写一些非常简单的 JavaScript 代码调用就可以了。 你需要两样东西,第一是: 1contenteditable contenteditable 是 HTML 中的一个属性,设置 HTML标签的 contenteditable=“true” 时,即可开启该元素的编辑模式。conte... 阅读全文
posted @ 2014-03-06 17:35 jami918 阅读(315) 评论(0) 推荐(0)
摘要:1) 禁止右键1$(document).ready(function(){2//catchtheright-clickcontextmenu3$(document).bind("contextmenu",function(e){4//warningprompt-optional5alert("Noright-clicking!");67//deletethedefaultcontextmenu8returnfalse;9});10});2) 文本缩放$(document).ready(function(){//findthecurrentfontsize 阅读全文
posted @ 2014-03-06 17:10 jami918 阅读(165) 评论(0) 推荐(0)
摘要:var loadMenu = function(data) { var trs = template.render('menu-list-temp', {'list': data}); $('.menu-list').html(trs); }; var refreshMenu = function() { mss._ajax({ url: window.location.href, success: function(data) { loadMenu(data.menus_data); } }); };原理就是:重新ajax获取内容,然后模块重新 阅读全文
posted @ 2014-02-17 16:07 jami918 阅读(207) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2014-02-17 15:49 jami918 阅读(398) 评论(0) 推荐(0)
摘要:后台:(有点问题 page应该从1开始 而不是从0开始) public function actionExperts() { $top=5; $page=empty($_GET['page']) ? 0 : $_GET['page']; $offset = $top*$page; $result = AboutUs::getExpertsList($top, $offset); if(!$result || count($result) request->isAjaxRequest) { // $this->ajaxRender(array(' 阅读全文
posted @ 2014-01-28 12:03 jami918 阅读(504) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/youmeng/p/3376353.htmlhttp://www.cnblogs.com/irelands/archive/2012/04/16/2451262.htmlhttp://blog.163.com/penglie_520/blog/static/19440505020127255319862/ 阅读全文
posted @ 2014-01-26 19:56 jami918 阅读(138) 评论(0) 推荐(0)
摘要:fl_img):?>fl_img;?>"> 阅读全文
posted @ 2014-01-24 17:08 jami918 阅读(231) 评论(0) 推荐(0)
摘要:Insert title here 阅读全文
posted @ 2014-01-24 15:25 jami918 阅读(140) 评论(0) 推荐(0)
摘要:$(function() { $('#login').on('click', function() { var username = $('#username').val(); var password = $('#password').val(); if (username == '' || password == '') { alert('账号或密码不能为空'); return ; } var params = {'username'... 阅读全文
posted @ 2014-01-13 10:59 jami918 阅读(808) 评论(0) 推荐(0)
摘要:http://www.planeart.cn/demo/artDialog/_doc/API.html#API 阅读全文
posted @ 2014-01-06 11:48 jami918 阅读(218) 评论(0) 推荐(0)
摘要:art 基本示例显示图片外部页面视频询问广告关闭弹出菜单引自http://blog.csdn.net/weinierbian/article/details/75664591 属性1.11 autoOpen ,这个属性为true的时候dialog被调用的时候自动打开dialog窗口。当属性为false的时候,一开始隐藏窗口,知道.dialog("open")的时候才弹出dialog窗口。默认为:true。1.12 初始化例:请注意,$('.selector')是dialog 的类名,在本例中.selector=#dialoag,以后不再说明。$('. 阅读全文
posted @ 2013-12-19 20:11 jami918 阅读(895) 评论(0) 推荐(0)

1