04 2018 档案
验证码
摘要:<?php //绘制验证码(生成) $num=4; //验证码的长度 $str = getCode($num,0);// 使用下面的自定义函数,获取需要的验证码值 session_start(); $_SESSION['res'] = $str; //1. 创建一个画布、分配颜色 $width=$n 阅读全文
posted @ 2018-04-29 10:56 ksy_c 阅读(210) 评论(0) 推荐(0)
3级菜单
摘要:<?php $array =[ ['id'=>1,'pid'=>0,'name'=>'电视'], ['id'=>2,'pid'=>1,'name'=>'美式电视'], ['id'=>3,'pid'=>1,'name'=>'中式电视'], ['id'=>4,'pid'=>2,'name'= 阅读全文
posted @ 2018-04-23 12:30 ksy_c 阅读(97) 评论(0) 推荐(0)
layer框架一些简单的
摘要:$('#id_1').on('click',function(){ layer.msg('不开心',{icon:5}); //icon从0-6 }); $('#id_2').on('click',function(){ // layer.alert('不开心'); // layer.alert('见 阅读全文
posted @ 2018-04-22 16:29 ksy_c 阅读(204) 评论(0) 推荐(0)
各种轮播
摘要:向左滑动 111会补到666后面,然后222等会往前 *{ padding: 0;margin: 0; } .content{ width: 612px; height: 60px; border: 1px solid #ccc; margin: 0 auto; overflow: hidden; 阅读全文
posted @ 2018-04-22 16:12 ksy_c 阅读(133) 评论(0) 推荐(0)
定时器
摘要:设置定时器 t=setTimeout(function(){ document.write('你好'); alert(2000); },2000); 清除定时器 clearTimeout(t); 多次执行定时器,执行10次 function fun(){ if(i>10){ clearTimeout 阅读全文
posted @ 2018-04-22 11:30 ksy_c 阅读(104) 评论(0) 推荐(0)
jq动画效果
摘要:三种显示方法,括号里放时间 $('#my').show(1000); $('#my').fadeIn(1000); $('#my').slideDown(1000); 三种隐藏方法 $('#my').hide(1000); $('#my').fadeOut(1000); $('#my').slide 阅读全文
posted @ 2018-04-22 11:23 ksy_c 阅读(111) 评论(0) 推荐(0)
验证码图片点击改变
摘要:js $('.img').click(function(){ $(this).parent().children('img').attr('src','./images/images.php?id='+Math.random()); }) js $('.img').click(function(){ 阅读全文
posted @ 2018-04-21 16:24 ksy_c 阅读(123) 评论(0) 推荐(0)
全选/全不选/反选
摘要:HTML 我们的页面上有一个歌曲列表,列出多行歌曲名称,并匹配复选框供用户选择,并且在列表下方有一排操作按钮。 <ul id="list"> <li><label><input type="checkbox" value="1"> 1.时间都去哪儿了</label></li> <li><label> 阅读全文
posted @ 2018-04-21 16:13 ksy_c 阅读(468) 评论(0) 推荐(0)
ajax
摘要:$.ajax({ url:"../api/user.api.php", dataType:"html", data:{sub:val}, type:"get", success:function(data){ alert(data); } }) $.get( '../api/user.api.php 阅读全文
posted @ 2018-04-21 15:05 ksy_c 阅读(75) 评论(0) 推荐(0)
全选 取消全选
摘要:<div class="select"> <input type="checkbox" name="" id="all"><span>全选</span> <br> <input type="checkbox" name="" id=""> <input type="checkbox" name="" 阅读全文
posted @ 2018-04-20 16:31 ksy_c 阅读(177) 评论(0) 推荐(0)
js 获取表单内容
摘要:a = $('#form').serialize(); 获取#form表单里面内容以字符串形式存储为a arr = $('#form').serializeArray(); 获取#form表单里面内容以数组形式存储为arr $.post('demo2.php',{name:a},function(d 阅读全文
posted @ 2018-04-20 11:44 ksy_c 阅读(204) 评论(0) 推荐(0)
jquery.cookie.js 使用方法
摘要:Cookies 定义:让网站服务器把少量数据储存到客户端的硬盘或内存,从客户端的硬盘读取数据的一种技术; 下载与引入:jquery.cookie.js基于jquery;先引入jquery,再引入:jquery.cookie.js;下载:http://plugins.jquery.com/cookie 阅读全文
posted @ 2018-04-20 11:06 ksy_c 阅读(126) 评论(0) 推荐(0)
jquery
摘要:恢复内容开始 载入执行 $(document).ready(function(){ alert('jquery!'); }) function test(){ alert('111'); } $(test); 等同于 $(document).ready(test()); 等同于 $(document 阅读全文
posted @ 2018-04-19 16:07 ksy_c 阅读(74) 评论(0) 推荐(0)
bootstrap
摘要:按钮: <button class="btn btn-success" value="成功">success</button> <button class="btn btn-default" href="#" role="button">default</button> <button class= 阅读全文
posted @ 2018-04-17 09:25 ksy_c 阅读(99) 评论(0) 推荐(0)
Linux安装数据库
摘要:安装sql: sudo apt-get install mysql-server mysql-client 查看是否安装成功: mysql -uroot -p 查看所有拓展: sudo apt-cache search php 安装拓展: sudo apt-get install php5-mysq 阅读全文
posted @ 2018-04-08 09:48 ksy_c 阅读(105) 评论(0) 推荐(0)