<html>
<body>
<h3 class="projectName" id="projectName"></h3>
<script type="text/javascript">
var unitID;
var unitName;
//获取参数的函数
function geturlPara()
{
var url = document.URL;
var para = url.substring(url.lastIndexOf("?") + 1, url.length);
var arr = para.split("&");
unitID = arr[0].split("=")[1];//获取url的第一个参数(unitID)
unitName=arr[1].split("=")[1];//获取url的第二个参数(unitName)
}
//得到参数
geturlPara();
$(document).ready(function(){
$("#projectName").append(decodeURIComponent(unitName));//解决url中文参数乱码的问题--解码
});
</script>
</body>
<html>