关于在eclipse中Undefined attribute name (role).解决办法


方案一:

只需要在jsp表头添加一句:

1     <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

方案二:

参考博客:https://blog.csdn.net/bymyself11/article/details/51944151

在eclipse中编程报错:Undefined attribute name (role).说明没有role属性这是版本不支持问题

1 <span style="font-family:SimSun;">
2     <ul class="nav nav-tabs" id="ul1">
3         <li role="presentation"><a href="#">hello</a></li>
4         <li role="presentation"><a href="#">文件夹</a></li>
5         <li role="presentation"><a href="#">hhhhh</a></li>
6     </ul>
7 </span>

我们只需要把role属性编程data-role即可

1 <ul class="nav nav-tabs" id="ul1">
2     <li data-role="presentation"><a href="#">hello</a>
3     </li><li data-role="presentation"><a href="#">文件夹</a></li>
4     <li data-role="presentation"><a href="#">hhhhh</a></li>
5 </ul>

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM