十二生肖查询网页版制作(php)
今天无聊做了一个十二生肖查询器:
预览网址效果:http://hongxing01.hktd02u.me48.com/03Sxcx
源代码下载:http://down.51cto.com/data/1985014
这个Demo的学习很适合php初学者学习,练练手。大神勿喷
每个人都是从初学开始的。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>生肖查询</title>
<style>
*{
margin:;
padding:;
}
.knr{
margin: auto;
padding: auto;
width:540px;
}
.tit{
background:url('./img/tit.png') no-repeat;
height:40px;
padding-top:20px;
padding-left:20px;
font:normal bold 12pt serif;
color:#026ea3;
}
.main{
float:left;
borde-left:1px solid #a9c9d0;
border-right:1px solid #a9c9d0;
border-bottom:1px solid #a9c9d0;
width:538px;
}
.inp{
float:left;
width:300px;
margin-left:20px;
margin-top:20px;
}
.intext{
width:250px;
height:25px;
}
.bun{
margin-top:15px;
margin-left:15px;
}
.sximg{
float:left;
border:1px solid #a9c9d0;
width:;
height:;
margin-bottom:10px;
}
</style>
</head>
<body>
<div class="knr">
<div class="tit">
十二生肖查询
</div>
<div class="main">
<div class="inp">
<form action="" method="post">
<input type="text" name="year" class="intext" value="请输入出行年。如:1993,右侧显示生肖" onfocus="this.value=''">
<input type="image" name="submit" class="bun" src="./img/submit.gif">
<input type="image" name="reset" class="bun" src="./img/reset.gif">
</form>
</div>
<div class="res">
<?php
$year = isset($_REQUEST['year']) ? $_REQUEST['year'] : ;
if(isset($year)&&($year> && $year<)){
$sx = $year % ;
?>
<div class="sximg">
<img src="./img/<?php echo $sx?>.png" width="">
</div>
<?php
}else{
echo '请输入正确的出生年份!';
}
?>
</div>
</div>
</div>
</body>
<script src="http://app.baidu.com/static/appstore/monitor.st"></script>
<script>
baidu.app.autoHeight();
baidu.app.setHeight();
</script>
</html>
十二生肖查询网页版制作(php)的更多相关文章
- 基于HTML5的捕鱼达人游戏网页版
之前给大家分享了html5实现的水果忍者,愤怒的小鸟,中国象棋游戏.今天给大家分享一款捕鱼达人(fishjoy)网页版游戏的源码.可以在线玩也可以下载到本地.它使用html5技术和javascript ...
- Shell脚本生成网页版相册浏览器
今天学到了一招,那就是使用脚本制作一款网页版相册浏览器.先上图吧. 必备基础 操作系统: 以linux为内核的操作系统都行 编程语言:Shell(bash)脚本,相关基础知识即可 下载工具:wget ...
- JavaScript之简易http接口测试工具网页版
简易http接口测试工具网页版,支持get.post请求,支持json格式消息体,form表单暂不支持. httpClient.html <!DOCTYPE html> <html ...
- Java课程寒假之开发记账本软件(网页版)之一
一.制定网页版记账本的基础功能 首先是下载了几个记账本APP,大致地看了一下记账本的功能:添加记录(支出,收入,自定义模板),查询流水(分类查询),账户. 二.开始做出框架 鉴于记账本有上面的功能,所 ...
- wechat 网页版通信全过程
想要记录总结一下自己在这个小项目中所遇到的坑,以及解决问题的思路. 首先我觉得这个小项目挺有实际市场的,市场上有一定的需求量,这个就是驱动力吧.这个小项目的关键点是wechat网页版通信全过程,讲真挺 ...
- Dreamweaver杀手!Illustrator终结者?Flash的末日?图形图像设计程序之网页版
Dreamweaver杀手!Illustrator终结者?Flash的末日?图形图像设计程序之网页版 阅读: 评论: 作者:Rybby 日期: 来源:rybby.com Adobe 家的 Il ...
- 用requests登录微信网页版,并接收发送消息
首先,网页版微信登录大致分为以下几个流程(都是大家可以通过抓包得到): 1.登陆主页后,会生成一个UUID,这是个用户标识,在后面请求二维码会用到 def get_uuid(self): '''获取u ...
- 五大主流数字币钱包:imToken数字货币钱包,Bitcoin core钱包,BTS网页版钱包,AToken轻钱包,Blockchain
AToken数字货币钱包 超容易上手支持五大主流币种 互联网 | 编辑: 王静涛 2017-12-28 09:58:33转载 国家监管部门已叫停数字货币交易,包括火币网.比特币中国.OKC ...
- 微信号网页版api
Django Wechat Api djangowechatapi是基于wxpy和django制作的web应用 安装 使用pip pip install djangowechatapi 源码安装 gi ...
随机推荐
- 关闭 iTunes 自动同步
关闭 iTunes 自动同步 iTunes>Edit>perererset>device>Prevent iPods,iPhone, and iPads from syncin ...
- 两种定时器 setInterval(一直执行) setTimeout(只执行一次)
//第一种 var obj = setInterval(function () { console.log(123); clearInterval(obj) }, 1000); //第二种 var t ...
- 【325】python**:selenium
参考:selenium安装方式 参考:Selenium2(Webdriver)+Python处理浏览器弹窗
- node.js和npm离线安装
离线安装node.js和npm 1.下载官方安装包并拷贝到离线机器上. 官方下载地址:https://nodejs.org/en/download/ 2.解压文件: tar-xJf node-v8.9 ...
- Python列表练习题
1.创建一个空列表,命名为names,往里面添加 Lihua.Rain.Jack.Xiuxiu.Peiqi和Black元素. #!-*- coding:utf-8 -*- names = [" ...
- ICG游戏:斐波那契博弈
描述: 有一堆个数为n(n>=2)的石子,游戏双方轮流取石子,规则如下: 1)先手不能在第一次把所有的石子取完,至少取1颗: 2)之后每次可以取的石子数至少为1,至多为对手刚取的石子数的2倍: ...
- Cplus Overolad new and delete Operator
思考:在C++类中,通过设计类的构造和析构函数,就已经把复杂的内存管理起来了. 及时是简单的结构体,也是有构造和析构函数的,而下面这种情况,可以在非结构中使用. /** Operator Overlo ...
- gatttool的使用
1.使能hci接口 # hciconfig hci0 up 2.使用hcitool搜索BLE设备 # hcitool lescan LE Scan ...D0:39:72:BE:D2:26 (unkn ...
- js 右击事件
$.fn.extend({ "rightclick": function (fn) { $(this).mousedown(function ( ...
- 在ceph中:pool、PG、OSD的关系
原文:http://www.cnblogs.com/me115/p/6366374.html Pool是存储对象的逻辑分区,它规定了数据冗余的类型和对应的副本分布策略:支持两种类型:副本(replic ...