如题,注意是超链接不是按钮,蓝色代码是不行的
<td> <a href='<s:url action="delJobTime" ><s:param name="jobid" value="jobid" /></s:url>'>Delete</a></td><td> <a href='<s:url action="delJobTime" disabled="true"><s:param name="jobid" value="jobid" /></s:url>'>Delete</a></td>
<td> <a href='<s:url action="delJobTime" ><s:param name="jobid" value="jobid" /></s:url>'>Delete</a></td><td> <a href='<s:url action="delJobTime" disabled="true"><s:param name="jobid" value="jobid" /></s:url>'>Delete</a></td>
5楼的例子能实现不可用,但我要的是处理下面这句代码。
<a href=' <s:url action="delJobTime" >
改一下这个超链接的style。
style="color:gray; text-decoration:none;"
不可用:
设定超链接的href='#'
<a href=' <s:url action="delJobTime" ' disabled='disabled'>PS:支持IE,不支持FF
HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception javax.servlet.ServletException: org.apache.jasper.JasperException: /jobTime/showJob.jsp(82,18) Attribute disabled invalid for tag url according to TLD
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
root cause org.apache.jasper.JasperException: /jobTime/showJob.jsp(82,18) Attribute disabled invalid for tag url according to TLD
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:236)
<td> <a href=' <s:url action="delJobTime" disabled="disabled"> <s:param name="jobid" value="jobid" /> </s:url>'>Delete </a> </td> disabled="disabled" 这个属性不能写在<s:url>标签里面,它是a标签里面的,应该这样:
<a href=' <s:url action="delJobTime"> <s:param name="jobid" value="jobid" /> </s:url>' disabled="disabled">Delete </a> --the earth country's people are know
<a href=' <s:url action="delJobTime"> <s:param name="jobid" value="jobid" /> </s:url>' disabled="disabled" onclick="return false">Delete </a>
就是利用 js 来去掉超链接的属性!如下<a href="www.google.cn" id="abc" onclick="noLink(this)">google </a><script>
function noLink(obj){ obj.removeAttribute('href');
}
</script>祝楼主好运!