在執行Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "if(confirm('保存成功!是否繼續添加?')){ location.href='BookDetail.aspx';}else{alert('fail');window.location.href='bookManagement.aspx';}");這句語句後css布局的頁面樣式會變亂
alert打斷css文件加載了吧。。不行放到window.onload事件中執行
Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "<script>window.onload=function(){if(confirm('保存成功!是否繼續添加?')){ location.href='BookDetail.aspx';}else{alert('fail');window.location.href='bookManagement.aspx';}}</" + "script>");
}