請參考下面的鏈接。如何通過jquery設置css以防止某些動作
How to disable text selection highlighting using CSS?
上述鏈路是有用的禁用選擇的同時拖動。代碼片段。
.unselectable {
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
user-select: none;
}
但我不想在這裏使用CSS概念。我想通過jQuery爲特定元素設置這些屬性。我怎樣才能做到這一點 ?
感謝,
溼婆
jQuery有很好的文檔,我建議來閱讀:HTTP: //api.jquery.com/css/。 – 2013-03-25 12:19:50