js得到url地址里面的参数
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Raker</title>
<style type="text/css">
<!--
.STYLE1 { color: #009999 }
body { background:#000; color:#fff; font-size:2em }
dl dt { width:480px; text-align:center; padding-top:150px }
dl dd { width:480px; text-align:center; margin:0; padding-top:40px }
img { border:0 }
-->
</style>
<script type="text/javascript">
function request(paras) //用来得到url地址里面的参数
{
var url = location.href;
var paraString = url.substring(url.indexOf("?")+1,url.length).split("&");
var paraObj = {}
for (i=0; j=paraString; i++){
paraObj[j.substring(0,j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=")+1,j.length);
}
var returnValue = paraObj[paras.toLowerCase()];
if(typeof(returnValue)=="undefined"){
return "";
}else{
return returnValue;
}
}

//alert(request('view'));
</script>
</head>
<body>
<dl>
  <dt>Connection exception</dt>
  <dd><img src="img/01.png" /></dd>
  <dd><a href="#"><img id="clewImg" src="img/but_01.png" /></a>
  <script type="text/javascript">
   document.getElementById('clewImg').src = "img/but_0"+request('view')+".png";
  </script>
    <!--<a href="#"><img src="img/but_02.png" /></a>-->
  </dd>
</dl>
</body>
</html>
lunzi   2011-03-26 16:23:18 评论:1   阅读:2968   引用:0

发表评论>>

署名发表(评论可管理,不必输入下面的姓名)

姓名:

主题:

内容: 最少15个,最长1000个字符

验证码: (如不清楚,请刷新)

Copyright@2004-2010 powered by YuLog