Contact Form 7 显示提交成功,并返回当前页面URL

1.需要先为按钮指定ID如“submit”,如果页面有多个表单按钮,那就需要定义多个ID

<a href="#" id="submit" onclick="document.getElementById('click').submit();return false;">
				<div class="yuyue-NOW" id="bottomBnt"><i>开始计算</i></div>
			</a>

 

2.DOM到按钮ID,使用javascript事件来跳转

<script type="text/javascript">
		document.getElementById( "submit" ).addEventListener( "click", function () {
			var url;
//将当前页面的URL,赋值给url变量
			url = window.location.href; 
			alert( "提交成功" );
			//跳转到当前页面URL
			location = url;
		} );
	</script>