Js获取url问号(View_Detail?data='+data.zjb_ID+'&'+data.D_Name)传值
<h1>Js逻辑</h1>
View_Detail?data='+data.zjb_ID+'&'+data.D_Name
<script>
$(function () {
var url = decodeURI(location.search); //获取url中"?"符后的字串
if (url.indexOf("?") != -1)
{
var str = url.substr(1)
var strs = str.split("&");
alert(strs[1]);
}
})
</script>
<h1>或</h1>
<script>
var Login_state = window.location.search;//得到url中?及后面的字符串
if (Login_state == "?Login_state=false")//验证登录状态,并友好提示
{
alert("请先登陆!");
}
</script>
Response.Redirect("/Login_/Index?Login_state=false",true);