今天无聊做了一个十二生肖查询器:

预览网址效果: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)的更多相关文章

  1. 基于HTML5的捕鱼达人游戏网页版

    之前给大家分享了html5实现的水果忍者,愤怒的小鸟,中国象棋游戏.今天给大家分享一款捕鱼达人(fishjoy)网页版游戏的源码.可以在线玩也可以下载到本地.它使用html5技术和javascript ...

  2. Shell脚本生成网页版相册浏览器

    今天学到了一招,那就是使用脚本制作一款网页版相册浏览器.先上图吧. 必备基础 操作系统: 以linux为内核的操作系统都行 编程语言:Shell(bash)脚本,相关基础知识即可 下载工具:wget ...

  3. JavaScript之简易http接口测试工具网页版

    简易http接口测试工具网页版,支持get.post请求,支持json格式消息体,form表单暂不支持. httpClient.html <!DOCTYPE html> <html ...

  4. Java课程寒假之开发记账本软件(网页版)之一

    一.制定网页版记账本的基础功能 首先是下载了几个记账本APP,大致地看了一下记账本的功能:添加记录(支出,收入,自定义模板),查询流水(分类查询),账户. 二.开始做出框架 鉴于记账本有上面的功能,所 ...

  5. wechat 网页版通信全过程

    想要记录总结一下自己在这个小项目中所遇到的坑,以及解决问题的思路. 首先我觉得这个小项目挺有实际市场的,市场上有一定的需求量,这个就是驱动力吧.这个小项目的关键点是wechat网页版通信全过程,讲真挺 ...

  6. Dreamweaver杀手!Illustrator终结者?Flash的末日?图形图像设计程序之网页版

    Dreamweaver杀手!Illustrator终结者?Flash的末日?图形图像设计程序之网页版 阅读:  评论:  作者:Rybby  日期:  来源:rybby.com Adobe 家的 Il ...

  7. 用requests登录微信网页版,并接收发送消息

    首先,网页版微信登录大致分为以下几个流程(都是大家可以通过抓包得到): 1.登陆主页后,会生成一个UUID,这是个用户标识,在后面请求二维码会用到 def get_uuid(self): '''获取u ...

  8. 五大主流数字币钱包:imToken数字货币钱包,Bitcoin core钱包,BTS网页版钱包,AToken轻钱包,Blockchain

    AToken数字货币钱包 超容易上手支持五大主流币种   互联网 | 编辑: 王静涛 2017-12-28 09:58:33转载     国家监管部门已叫停数字货币交易,包括火币网.比特币中国.OKC ...

  9. 微信号网页版api

    Django Wechat Api djangowechatapi是基于wxpy和django制作的web应用 安装 使用pip pip install djangowechatapi 源码安装 gi ...

随机推荐

  1. 「小程序JAVA实战」小程序视频播放的时候生命周期的控制(56)

    转自:https://idig8.com/2018/09/23/xiaochengxujavashizhanxiaochengxushipinbofangdeshihoushengmingzhouqi ...

  2. 在Ubuntu16.04中安装Docker CE

    apt-get install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https ...

  3. 如何在eclipse中添加android ADT(转)

    转自: http://jingyan.baidu.com/article/b0b63dbfa9e0a74a4830701e.html 对于程序开发的学者来说,eclipse并不陌生,它为我们提供了一个 ...

  4. Android提交自己的作品到GitHub上

    最近在做一个期待上架的我个人写的App,我打算将它开源出去,托管到GitHub上.看了一下网上的教程,其实五花八门,我照着做了,还是没法提交到GitHub上.自己研究了一下,其实非常的简单.这里决定介 ...

  5. 安装labelImg

    上篇文章,我提到了安装这个工具时,遇到pyqt与sip版本不匹配的未解决问题,最后是通过windows版本一键实现的,工具包见下面链接. 参考:http://blog.csdn.net/jesse_m ...

  6. 47. Permutations II (Back-Track, Sort)

    Given a collection of numbers that might contain duplicates, return all possible unique permutations ...

  7. 1014_C语言的文法

    程序-> <外部声明><程序><外部声明> 外部声明-> <函数定义>|<声明> 函数定义-> <函数类型>& ...

  8. Java Thread系列(十)Future 模式

    Java Thread系列(十)Future 模式 Future 模式适合在处理很耗时的业务逻辑时进行使用,可以有效的减少系统的响应时间,提高系统的吞吐量. 一.Future 模式核心思想 如下的请求 ...

  9. mybatis小工具

    1.其实也不算是针对mybatis的其他都可以用 lombok 2.mybatis的小插件,可以快速定位到mapper.xml和接口之间 mybatisx

  10. ADO.net开放式并发

    https://docs.microsoft.com/zh-cn/dotnet/framework/data/adonet/optimistic-concurrency 在多用户环境中,有两种用于更新 ...