开发者

Make specific elements in designMode iframe read-only?

开发者 https://www.devze.com 2023-01-06 05:15 出处:网络
I have an iframe which has designMode set to \'on\'. In it, I have a div which the user should be able to type in, and also in the if开发者_StackOverflowrame, I have another div which the user should

I have an iframe which has designMode set to 'on'. In it, I have a div which the user should be able to type in, and also in the if开发者_StackOverflowrame, I have another div which the user should NOT be able to type in.

Is there a way to do this? Using contentEditable is not a solution in my case.


Apply both -moz-user-select: none; and -moz-user-modify: read-only to the element. There are also -webkit equivalents. Remember, designMode doesn't work in Internet Explorer.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号