jquery 获取某a标签的href地址 实现页面加载时跳转

jQuery(document).ready(function(){
if(jQuery("#zzjg a").length>0)
{
var hrefValue = jQuery("#zzjg a").eq(0).attr("href");
window.location.replace(hrefValue);
}
else
{
 window.location.replace("/zgb/Pages/home.aspx");
 }
});

posted @ 2015-09-01 09:45  717806198  阅读(1958)  评论(0编辑  收藏  举报