firefox IE不同,innerText问题 [英] firefox IE different, innerText question

查看:88
本文介绍了firefox IE不同,innerText问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


i得到的这段代码在IE中工作正常,但在FF中没有用

hello all,

i got this code that works fine in IE but not in FF

展开 | 选择 | Wrap | 行号

推荐答案

嗨...


为此目的你不应该检测到浏览器...你可能只是对所有浏览器使用innerHTML而不是innerText ...


亲切的问候
hi ...

for that purpose you shouldn''t detect a browser ... you may simply use innerHTML instead of innerText for all browsers ...

kind regards


FF得到了textContent属性:D

这个功能应该足够......

FF got textContent property instead :D
This function should be sufficient ...

展开 | 选择 | 换行 | 行号


感谢快速回放的玩家


GITS-

如果我将使用innerHTML它会显示代码还是会执行它?

我需要查看代码,用户应该看到代码没有执行它:)


DASTY-

为什么php?

是否可以在javascript中运行?
thanks for the fast replays guys

GITS-
if i will use innerHTML it will display the code or will execute it ?
i need to see the code the user should see the code not execute it :)

DASTY-
why php?
is it going to work in javascript as well?


这篇关于firefox IE不同,innerText问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆