读书人

Button (JSP) 如何跳转 不了页面

发布时间: 2014-01-08 14:18:52 作者: rapoo

Button (JSP) 怎么跳转 不了页面
<input type="button" name="button" value="" onclick="window.location.href('index.jsp')"/>


点了没效果, 求解释!!!!
[解决办法]


<html>
<head>
<title>Test</title>
<script>
function aab() {
alert('turn to aa.html');
window.location.href = './aa.html';
}
</script>
</head>
<body>
<input type="button" name="button" value="aa" onclick="aab()"/>
</body>
</html>

[解决办法]
<input type="button" name="button" value="" onclick="window.location.href('index.jsp')"/>
改成
<input type="button" name="button" value="" onclick="window.location.href='index.jsp'"/>

读书人网 >Eclipse开发

热点推荐