2016-09-09 10 views
0

First <a tag> onclick --> doesn't work (a tag onclick) but second button onclick --> works.ボタンonclickのみが動作します。<a onclick> tag doesn't work in javascript when sending parameter to another page

Anyone knows what's the problem with <a> tag??

function content(frm) { 
    var url = "noticeContent.jsp"; 
    var title = "test"; 
    var status = "toolbar=no,directories=no,scrollbars=no,resizable=no,status=no,menubar=no,width=240, height=200, top=0,left=20" 
    window.open("", title,status); 
    frm.target = title; 
    frm.action = url; 
    frm.method = "post"; 
    frm.submit(); 
} 

<form name="f_name"> 
    <input type="hidden" name="a" value="1"> 
    <input type="hidden" name="b" value="2"> 
     <td><a href="javascript:" onclick="content(this.form)"></a></td> 
     <td><input type="button" onclick="javascript:content(this.form)"></td> 
</form> 
+0

works fine here. done any basic debugging, like checking the console? –

+0

can you tell mewhat it pops when clicking a tag? iam only getting about:blank, and i get right page when clicking button. its freaking weird –

答えて

関連する問題