Scripting Language : AngularJS
My Html Code is :
<li>
<a href="javascript:void(0)">
<label ng-if="show">MyName</label>
<i class="fa fa-pencil" ng-if="show">
<i class="fa fa-trash" ng-if="show">
<input type="text" ng-hide="show" />
</a>
</li>
this above html working in all browser excepting in IE edge..
this functionality done for , when i click on edit icon in list , label will remove and textbox will show with label value ..
its like editing list for whatever i will selected or renamed of that label value .
This html code working fine in (firefox,google chrome excepting IE9 above & Edge).
答案 0 :(得分:0)
使用html validator尝试。
输出是:
错误:元素输入不得作为 a 的后代出现 元件。
所以基本上这不是一个有效的HTML,它取决于浏览器对它们解析标记的严格程度。因此,您可能希望在代码中使用一些变通方法来获得所需的相同效果,但不使用这种标记。