1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 |
<SCRIPT type="text/javascript">
function refresh_MainFrame_get(url)
{
$.ajax({
type:"get",
url: url,
success: function(response)
{
$('html, body').animate({scrollTop:0}, 'slow');
$('.refresh_MainFrame').html(response);
}
});
}
function refresh_MainFrame_post(frm)
{
$.ajax({
type:"post",
url: frm.action,
data: $(frm).serialize(),
success: function(response)
{
$('html, body').animate({scrollTop:0}, 'slow');
$('.refresh_MainFrame').html(response);
}
});
}
</SCRIPT>
|
FORM 의 OnSubmit 을 보면
return false; 를 한다. 만약 이게 없으면 PAGE 전환이 된다. 고로 필히 존재해야한다.
1
2
3
4
5
6 |
<FORM OnSubmit="JavaScript:refresh_MainFrame_post(this); return false;" action="/notice/read.jsp">
<input type=text name=notice_id value=2><BR>
<input type=text name=a1 value=2><BR>
<input type=text name=a2 value=2><BR>
<INPUT type="submit" value="가입 요청" style="width:256px;" />
</FORM>
|
A tag 를 보면 href 가 없다. href="#" 을 하게 되면 주소 부분에 # 이 추가된다.
1 |
<A OnClick="JavaScript:refresh_MainFrame_get('/notice/read.jsp?notice_id=1&prev');">
|