[問題] Ajax動態load進一個page
<script type="text/javascript" src="library_js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$.ajax({url:"showPage.jsp", success:function(result){
$("div").html(result);
}});
});});
</script>
</head>
<body>
<div><h2>Let AJAX change this text</h2></div>
<button>Change Content</button>
</body>
目前有看到這樣的作法
問題是我的url 後面還會有一些參數
而script內的url是寫死的
有辦法使用動態的url嗎?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 211.76.175.169
→
08/09 16:54, , 1F
08/09 16:54, 1F
推
08/09 17:02, , 2F
08/09 17:02, 2F
推
08/10 00:03, , 3F
08/10 00:03, 3F
Ajax 近期熱門文章
PTT數位生活區 即時熱門文章
-11
18