dwr函数调用一点小问题

前端之家收集整理的这篇文章主要介绍了dwr函数调用一点小问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
<span style="font-size:18px;">var priority = document.getElementById("priority").value;
var servicename = document.getElementById("servicename").value;
var inParam = {servicename:null,priority:null};
inParam.servicename = servicename;
inParam.priority=priority;
		   
queryRequestTypeConfigService.checkConfIsExist(inParam,function(data) {   
if (data > 0){return;}else{ document.all.requestTypeForm.submit();}
}); 

<!--因为在jsp页面掉java函数,无编译期泛型检查-->
<allow>         
    <create creator="spring" javascript="queryRequestTypeConfigService">
		<param name="beanName" value="queryRequestTypeConfigService" />
		<include method="deleteRequestType" />
		<include method="checkConfIsExist" />
	</create>
</allow>

@SuppressWarnings("unchecked")
int checkConfIsExist(Map inParams);

//出错,因为前台传递的参数都是Object类型的;
int checkConfIsExist(Map<String,Object> inParams);</span>
<span style="font-size:18px;">
</span>
<span style="font-size:18px;"></span><pre name="code" class="html"><span style="font-size:18px;">// 添加action属性时要加工作路径
// document.all.myform.submit(); 
var form = document.getElementById("forSubmit");
form.action = "${request.contextPath}/XXXX/requestTypeConfigAction.action";     
form.submit();</span>
原文链接:https://www.f2er.com/ajax/163832.html

猜你在找的Ajax相关文章