if($("#signOut").text()){
window.location.href="<%=basePath%>/jsp/weibo/index.jsp"; }else{
window.location.href="<%=basePath%>index.jsp"; } } script> 3.解释: $("#signOut").text()为我所需要判断的对应ID的Html元素的值