我想在不刷新或重新加载页面的情况下将当前页面的 url 发送到 servlet。这是代码-
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Action Onclick </title>
<!-- <script>
$('#contactForm').submit(function () {
alert('sdafjb');
return false;
});
</script>-->
</head>
<body>
<form id="contactForm" >
<fieldset>
<label for="Name">Name</label>
<input id="contactName" type="text" />
</fieldset>
<fieldset>
<label for="Email">Email</label>
<input id="contactEmail" type="text" />
</fieldset>
<fieldset class="noHeight">
<textarea id="contactMessage" cols="20"></textarea>
<a href="#" onclick="document.getElementById('contactForm').submit();"> submit </a>
</fieldset>
</form>
<small id="messageSent">Your message has been sent.</small>
</body>
我的 servlet 的名称是 scriptservlet。请帮我...