如题,注意是超链接不是按钮,蓝色代码是不行的
<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>

解决方案 »

  1.   

    超链接没有disabled这个属性。
      

  2.   

    你再来个事件,把href设成“#”试试看。
      

  3.   

    <a href="http://www.google.com" disable="true" onclick="return false">google</a>
      

  4.   


    5楼的例子能实现不可用,但我要的是处理下面这句代码。
    <a href=' <s:url action="delJobTime" >
      

  5.   

    变灰:
    改一下这个超链接的style。
    style="color:gray; text-decoration:none;"
    不可用:
    设定超链接的href='#'
      

  6.   


    <a href=' <s:url action="delJobTime" '  disabled='disabled'>PS:支持IE,不支持FF
      

  7.   

    <td> <a href='<s:url action="delJobTime" disabled="disabled"><s:param name="jobid" value="jobid" /></s:url>'>Delete</a></td>出错信息:
    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)
      

  8.   


    <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
      

  9.   

    嵌套一个自适大小的DIV不就完了么!DIV不可用。
      

  10.   

    ok.12楼得分。不过还要加onclick="return false"才会起作用,否则只是变灰。另外加入disabled="disabled"后出现warning: Undefined attribute name (disabled).不知道是什么原因?
    <a href=' <s:url action="delJobTime"> <s:param name="jobid" value="jobid" /> </s:url>'  disabled="disabled" onclick="return false">Delete </a>
      

  11.   

    那没事,只是警告你这个disabled属性在某些浏览器某些版本下不受支持
      

  12.   

    可以这样子的!
    就是利用 js 来去掉超链接的属性!如下<a href="www.google.cn" id="abc" onclick="noLink(this)">google </a><script> 
      
       function noLink(obj){    obj.removeAttribute('href');
       }
     
    </script>祝楼主好运!