关于在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>

猜你喜欢

转载自www.cnblogs.com/smartisn/p/11621894.html