方案一:
只需要在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>