开发者

Is it possible to use disable text selection script on everything exept input tag

I use this script in one of my开发者_开发问答 applicatuions, but now I would like to do everything same way exept disapply this script for all input tags.

Could anyone say is it possible, ot there is some other solution?


Using only CSS, this should work in most modern browsers (jsfiddle):

* {
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: -moz-none;
    -o-user-select: none;
    user-select: none;
}

input {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -o-user-select: text;
    user-select: text;
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜