- 博客(11)
- 收藏
- 关注
原创 简单的php留言本例子温习
首先写前端:写在10.html页面上<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN"><head
2016-06-25 17:54:44
495
原创 js正则表达式的运用
<script>function check(num){ var reg = /^[a-zA-Z]{4}\d{7}$/; var num = document.getElementById("num"); if(reg.test(num.value)==true){ window.location.href="true.html"; return false; }e
2016-06-24 15:07:47
256
转载 JavaScript伸缩的菜单简单示例
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>伸缩的菜单</title> <style> <!-- body{ background-color:#
2015-07-31 14:35:06
466
转载 session用法
PHP session用法其实很简单它可以把用户提交的数据以全局变量形式保存在一个session中并且会生成一个唯一的session_id,这样就是为了多了不会产生混乱了,并且session中同一浏览器同一站点只能有一个session_id,下面我们一起来看看关于session使用方法。 如何使用session,凡是与session有关的,之前必须调用函数session_start(); 为se
2015-06-20 15:59:14
545
转载 PHP将数组存入到数据库中
以下四种方法: 1.implode()和explode()方式 2.print_r()和自定义函数方式 3.serialize()和unserialize()方式 4.json_encode()和json_decode()方式// serialize方式function serial($table,$arr){ echo '<h3 style="color:red"><b>
2015-06-18 16:06:36
3826
原创 时间戳运用例子
$ten=mktime(0,0,0,date("m"), date("d"), date("Y"));前面的参数可以设置时间,分别是时,分,秒,如果要设置明天,在date(“d”)+1;昨天就减1,以此类推。 echo date("Y/m/d"); echo " "; echo date("Y.m.d"); echo " "; echo date("Y-m-d"); ?> 以上代码
2015-06-16 19:14:15
1488
转载 div跟着滚动条移动而移动
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head><meta charset="UTF-8">
2015-06-10 17:45:15
3716
转载 三级菜单
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><t
2015-06-10 17:36:56
289
原创 jQuery siblings() 方法
function showt() {$('#show_pic img').eq(a).show().siblings('img').hide();// 选取指定 index 值的元素显示,其他隐藏 $('.pic_ul li').eq(a).css('border','2px solid red').siblings('li').css('border','1px sol
2015-06-10 16:56:51
1066
原创 分页例子
<?php //连接数据库 $page = 1; $db = mysql_connect('localhost','root','root'); mysql_select_db('try',$db); $pagesize = 2; //每页显示到数量 //计算一共有多少记录,用于计算页数 $rs = mysql
2015-06-08 22:06:08
285
原创 一个简单的标签例子
<style>.indexgg { width:340px; height:35px; border-left:1px solid #ccc; float: left; cursor:pointer;}.indexgg span p { text-align: center; width:103px;
2015-06-08 21:59:15
431
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人