如何在点击事件后将js值设置为jsp变量?

时间:2018-03-15 11:13:40

标签: javascript jquery jsp

这里我想要设置js值(表名),这是在javascript中,想在点击按钮后在jsp变量中设置这个js值

我的Javascript和JSP是什么?

<div id="header"> 
<h3></h3>
<form action="ResultsetMetaDataEx.jsp" method="post" name="">
    <button id="marksheet" value="marksheet" class="marksheet" onclick="call(); ">marksheet</button>
    <button name="btn" id="company" value="company" class="company">company</button>
    <button name="btn" id="book" value="book" class="book">book</button>
</form>

<script type="text/javascript">
		
$('.marksheet').click(function(){		
		call(){
			var tablename = this.id;
			alert(tablename);
			window.location.replace("ResultsetMetaDataEx.jsp?tablename="+tablename);	
		}
	});
	
</script>

0 个答案:

没有答案