获取从链接传来的id
<!-- 获取id -->
<script type="text/javascript">
var id=getQueryString('id');
function getQueryString(id) {
var reg = new RegExp("(^|&)" + id + "=([^&]*)(&|$)", "i");
var r = decodeURI(window.location.search).substr(1).match(reg);
if(r != null) return (r[2]);
return null;
}
</script>