本文介绍了如何在火狐中编辑跨度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

甚至通过在span标签中设置contentEditable =true,在fire fox中,这个标签无法编辑,而IE中没有问题。我可以做什么?

解决方案

contenteditable是一个新的html5属性,如果您的浏览器支持它,Chk。
$ b

 <!DOCTYPE html> 
< html lang =en>
< head>
< meta charset =utf-8>
< title> test< / title>
< script>
if('contentEditable'in document.createElement('span')){
alert('ContentEditable is supported by your browser');
} else {
alert('ContentEditable不支持您的浏览器');
}
< / script>
< / head>
< body>
< h2>待办事项列表< / h2>
< ul contenteditable =true>
< li> < span>打破机械驾驶室的驾驶员。 < /跨度>< /锂>
< li> < span>驶往废弃工厂< / span>< / li>
< li>< span>访问牙医< / span> < /锂>
< / ul>
< / body>
< / html>

因此,当您搜索修复程序时,以下是一个名为contentEditable jQuery Plugin的插件。
url: http://valums.com/edit-in-place/


even by setting contentEditable="true" in span tag , in fire fox this tag is not able to edit while there is no problem in IE. what can i do?

解决方案

contenteditable is a new html5 attribute, Chk if your browser supports it.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>test</title>
    <script>
        if('contentEditable' in document.createElement('span')){
            alert('ContentEditable is supported by your browser');
        }else{
            alert('ContentEditable is not supported by your browser');
        }               
    </script>
</head>
<body>
    <h2> To-Do List </h2>
     <ul contenteditable="true">
        <li> <span>Break mechanical cab driver. </span></li>
        <li> <span>Drive to abandoned factory</span></li>
        <li><span> Visit Dentist</span> </li>
     </ul>
</body>
</html>

Incase you searching for a fix then,here is a plugin called contentEditable jQuery Plugin.url: http://valums.com/edit-in-place/

这篇关于如何在火狐中编辑跨度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 00:49