电脑爱好者,提供IT资讯信息及各类编程知识文章介绍,欢迎大家来本站学习电脑知识。 最近更新 | 联系我们 RSS订阅本站最新文章
电脑爱好者
站内搜索: 
当前位置:首页>> HTML>>htm后加参数|html?|htm?id=keyword形式的技术分析:

htm后加参数|html?|htm?id=keyword形式的技术分析

来源:远方网络 | 2005-12-30 14:26:19 | (有6282人读过)

今天看了朋友发的一个祝福网页,主要形式大体是输入你的名字然后生成一个新的网址,这个网址显示的内容大部分是搞笑的和离谱的,例如一些关键的名字位置会显示你的名字等等。
分析如下:
一、主页部分:
<HTML><HEAD>
<title>网页名称</title>
<link rel="stylesheet" href="images/style.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script src='images/sd.js'></script>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style1 {
color: #FFFFFF;
font-weight: bold;
}
.l17 {line-height:170%;}
.f14 {font-size:14px}
.kwc{width:155px;margin-left:12px;}
#con li{float: left;list-style-type: none;}
.STYLE2 {font-size: 16px}
.style4 {
color: #000000;
font-size: large;
}
.blue {
font-family: "宋体";
font-size: 12px;
color: #33CCFF;
}
.style9 {font-family: "宋体"; font-size: 12px; color: #3399FF; }
.nchannel { FONT-SIZE: 12px; COLOR: #ffffff; LINE-HEIGHT: 1.2; TEXT-DECORATION: none
}
-->
</style>
<SCRIPT language=JavaScript>
<!--
if (top.location != location) top.location.href = location.href;
// --></SCRIPT>
<SCRIPT language=javascript author=luxiaoqing><!--
function initArray(){for(i=0;i<initArray.arguments.length;i++)
this[i]=initArray.arguments[i];}var isnMonths=new initArray("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月");var isnDays=new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日");today=new Date();hrs=today.getHours();min=today.getMinutes();sec=today.getSeconds();clckh=""+((hrs>12)?hrs-12:hrs);
clckm=((min<10)?"0":"")+min;clcks=((sec<10)?"0":"")+sec;clck=(hrs>=12)?"下午":"上午";var stnr="";var ns="0123456789";var a="";

//-->

</SCRIPT>
</HEAD>
<BODY bgcolor="#FFFFFF">

<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<th align="center" valign="middle" scope="row"><TABLE width=600 border=0 align="center" cellPadding=2 cellSpacing=1 bgColor=#000000>
<TBODY>
<TR>
<TD align=middle bgColor=#990000 height=58> <div align="center" class="style1"> <span class="STYLE2">惊爆!落选福娃
<script>document.write(lusername)</script>
</span></div></TD>
</tr>
<TR>
<TD align=middle bgColor=#FFFFFF height=120> <div align="center">
 
<center>
<table style="BORDER-RIGHT: #d0d0d0 1px solid; BORDER-TOP: #d0d0d0 1px solid; BORDER-LEFT: #d0d0d0 1px solid; BORDER-BOTTOM: #d0d0d0 1px solid" cellSpacing="0" cellPadding="0" width="760" bgColor="#ffffff" border="0" id="table1">
<tr>
<td style="font-size: 12px; color: #434343; border-right: 1px solid #d0d0d0; border-bottom: 0px solid #d0d0d0" vAlign="top" align="left">
<table cellSpacing="0" cellPadding="0" width="100%" border="0" id="table2">
<tr>
<td style="font-size: 12px; color: #434343"> <table cellSpacing="10" cellPadding="10" width="100%" border="0" id="table3">
<tr>
<td style="font-size: 14px; color: #434343">
<div align="center">
<span style="FONT-SIZE: 12px; COLOR: #999999"><a target="_blank" href="http://www.cncfan.com" target=_blank><span class="style9">www.cncfan.com</span></a> 2005年12月22日 4:11:38 <span class="style4"><a target="_blank" href="http://www.cncfan.com" target=_blank>悠视网</a></span>

</span></div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="84" bgcolor="#FF9933"><img src="images/bannar01.jpg" width="778" height="84"></td>
</tr>
</table>
<br>
<table>
<tr>
<td bgcolor=white><div align="center"><img src="images/fuwabb.jpg" width="120" height="100"><br>
福娃贝贝 <br>
</div></td>
<td bgcolor=white><div align="center"><img src="images/fuwajj.jpg" width="120" height="100"><br>
福娃晶晶<br>
</div></td>
<td bgcolor=white><div align="center"><img src="images/fuwahh.jpg" width="120" height="100"><br>
福娃欢欢<br>
</div></td>
<td bgcolor=white><div align="center"><img src="images/fuwayy.jpg" width="120" height="100"><br>
福娃迎迎<br>
</div></td>
<td bgcolor=white><div align="center"><img src="images/fuwann.jpg" width="120" height="100"><br>
福娃妮妮<br>
</div></td>
<td bgcolor=white><div align="center"><img src="images/fwpig.gif" width="128" height="128"><br>
<font class="f14" id="zoom"> 福娃
<script>document.write(lusername)</script>
</font><br>
</div></td>
</TR>
</table>
</center>
</div>
惊现第六个后备福娃<br>
<br>
<br> <table border="0" width="780" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">  <font class="f14" id="zoom"><a target="_blank" href="http://www.cncfan.com/" target=_blank><strong>悠视网最新资讯</strong></a> 独家新闻报道. 奥运吉祥物福娃系列本来应该选定六个的,还有一个叫 福娃
<script>document.write(lusername)</script>
。其实
<script>document.write(lusername)</script>
也是一个非常可爱的吉祥物,但考虑到
<script>document.write(lusername)</script>
不适合运动,所以去掉了可爱的
<script>document.write(lusername)</script>
。其实也怪
<script>document.write(lusername)</script>
自已不争气,看看下面的图你就应该知道了。</font><br>
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td height="27" class="indexkuang00" ><div align="center">福娃展示奥运会项目造型</div></td>
</tr>
</table>
<table width="778" border="0" align="center" cellpadding="2" cellspacing="2" class="indexkuang01">
<tr>
<td width="117" class="indexfuwabb">福娃贝贝</td>
<td width="534" class="indexfuwabb01"> </td>
<td width="105" class="indexfuwabb01"><div align="center"></div></td>
</tr>
<tr>
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="23"><div align="center"><img src="images/youyong.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/hyyouyong.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/tiaosui.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/fanchuan.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/pihuating.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/suiqiu.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/ystichao.jpg" width="90" height="120"></div></td>
</tr>
<tr>
<td height="21"> <div align="center">游泳</div></td>
<td><div align="center">花样游泳</div></td>
<td><div align="center">跳水</div></td>
<td><div align="center">帆船</div></td>
<td><div align="center">皮划艇静水</div></td>
<td><div align="center">水球</div></td>
<td><div align="center">艺术体操</div></td>
</tr>
</table></td>
</tr>
</table>
<table width="778" border="0" align="center" cellpadding="2" cellspacing="2" class="indexkuang01">
<tr>
<td width="117" class="indexfuwajj">福娃晶晶</td>
<td width="533" class="indexfuwabb01"> </td>
<td width="106" class="indexfuwabb01"><div align="center"></div></td>
</tr>
<tr>
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="23"><div align="center"><img src="images/juzhong.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/bangqiu.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/shejian.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/shuaijiao.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/roudao.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/sheji.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/quanji.jpg" width="90" height="120"></div></td>
</tr>
<tr>
<td height="21"> <div align="center">举重</div></td>
<td><div align="center">棒球</div></td>
<td><div align="center">射箭</div></td>
<td><div align="center">摔跤</div></td>
<td><div align="center">柔道</div></td>
<td><div align="center">射击</div></td>
<td><div align="center">拳击</div></td>
</tr>
</table></td>
</tr>
</table>
<table width="778" border="0" align="center" cellpadding="2" cellspacing="2" class="indexkuang01">
<tr>
<td width="123" class="indexfuwahh">福娃欢欢</td>
<td width="526" class="indexfuwabb01"> </td>
<td width="107" class="indexfuwabb01"><div align="center"></div></td>
</tr>
<tr>
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="23"><div align="center"><img src="images/zuqiu.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/lanqiu.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/xlzhixinche.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/taiquandao.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/mashu.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/tierensanxiang.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/xiandaiwuxiang.jpg" width="90" height="120"></div></td>
</tr>
<tr>
<td height="21"> <div align="center">足球</div></td>
<td><div align="center">篮球</div></td>
<td><div align="center">小轮自行车</div></td>
<td><div align="center">跆拳道</div></td>
<td><div align="center">马术</div></td>
<td><div align="center">铁人三项</div></td>
<td><div align="center">现代无项</div></td>
</tr>
</table></td>
</tr>
</table>
<table width="778" border="0" align="center" cellpadding="2" cellspacing="2" class="indexkuang01">
<tr>
<td width="129" class="indexfuwayy">福娃迎迎</td>
<td width="524" class="indexfuwabb01"> </td>
<td width="105" class="indexfuwabb01"><div align="center"></div></td>
</tr>
<tr>
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="23"><div align="center"><img src="images/tichao.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/ppqiu.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/tianjin.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/wangqiu.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/qugunqiu.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/glzhixinche.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/sdzhixinche.jpg" width="90" height="120"></div></td>
</tr>
<tr>
<td height="21"> <div align="center">体操</div></td>
<td><div align="center">乒乓球</div></td>
<td><div align="center">田径</div></td>
<td><div align="center">网球</div></td>
<td><div align="center">曲棍球</div></td>
<td><div align="center">公路自行车</div></td>
<td><div align="center">山地自行车</div></td>
</tr>
</table></td>
</tr>
</table>
<table width="778" border="0" align="center" cellpadding="2" cellspacing="2" class="indexkuang02">
<tr>
<td width="129" class="indexfuwann">福娃妮妮<br>
</td>
<td width="524" class="indexfuwabb01"> </td>
<td width="105" class="indexfuwabb01"><div align="center"></div></td>
</tr>
<tr>
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="23"><div align="center"><img src="images/jijian.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/leiqiu.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/bengchuang.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/paiqiu.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/stpaiqiu.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/yumaoqiu.jpg" width="90" height="120"></div></td>
<td><div align="center"><img src="images/cdzhixinche.jpg" width="90" height="120"></div></td>
</tr>
<tr>
<td height="21"> <div align="center">击剑</div></td>
<td><div align="center">垒球</div></td>
<td><div align="center">蹦床</div></td>
<td><div align="center">排球</div></td>
<td><div align="center">沙滩排球</div></td>
<td><div align="center">羽毛球</div></td>
<td><div align="center">厂地自行车</div></td>
</tr>
</table></td>
</tr>
</table>
<table width="778" border="0" align="center" cellpadding="2" cellspacing="2" class="indexkuang02">
<tr>
<td width="129" class="indexfuwann">福娃<font class="f14" id="zoom">
<script>document.write(lusername)</script>
</font><br>
</td>
<td width="524" class="indexfuwabb01"> </td>
<td width="105" class="indexfuwabb01"><div align="center"></div></td>
</tr>
<tr>
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="23"><div align="center"><img src="images/pig1.jpg" width="135" height="135"></div></td>
<td><div align="center"><img src="images/pig2.jpg" width="135" height="135"></div></td>
<td><div align="center"><img src="images/pig3.jpg" width="135" height="135"></div></td>
<td><div align="center"><img src="images/pig4.jpg" width="135" height="135"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
</tr>
<tr>
<td height="21"> <div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
</tr>
</table></td>
</tr>
</table>
<FORM name=newinfo_form onsubmit="return check(this)">
<p align="center"><FONT color=#ff0000 size=3 class="f14" id="zoom"><B><img id='Img2' src='' width='1' height='1'></b></font><font class="f14" id="zoom"><B><FONT color=#ff0000 size=2>想忽悠你的好友吗?快输入好友的姓名:</font><FONT color=#ff0000 size=3>
<INPUT name=stra id="stra" size="16" maxlength="8" tabindex=1>
<INPUT name="submit" type=submit tabindex=2 value=生成网址>
</font> </b></font></p>
</FORM>
</td>
</tr>
</table>
二、关键JS代码部分:
var lusername =location.search.split("=")[1];
if(!lusername){
lusername="哼哼";
}
else{
lusername=unescape(lusername);
}

function check(obj){
if (obj.stra.value.length>8) {
alert('太长');
return false;
}
if (obj.stra.value.length==0) {
alert('还没填姓名呀');
return false;
}
var url ="http://"+location.host+location.pathname+"?uusee="+escape(obj.stra.value);
window.clipboardData.setData("Text",url);
alert('网址已生成并替您复制好了,快发给您的朋友吧!');
window.location.replace(url);
return false;
}
HTML热门文章排行
网站赞助商
购买此位置

 

关于我们 | 网站地图 | 文档一览 | 友情链接| 联系我们

 电脑爱好者群组:15171632(群1)  VB学习群:14746960(群2)
Copyright © 2003-2017 电脑爱好者 版权所有 备案号:鲁ICP备09059398号