禁止複製:οncοpy=”return false”
禁止粘貼:οnpaste=”return false”
禁止剪切:oncut=”return false”
禁止右鍵彈出:οncοntextmenu=”return false”
關閉自動完成功能(緩存):autocomplete=”off”
自動獲得焦點:autofocus=”autofocus”
禁用自動更正:autocorrect=”off”
來關閉鍵盤默認首字母大寫(移動端):autocapitalize=”off”
不對元素的文本進行拼寫檢查:spellcheck=”false”
onpaste是粘貼事件,ondragenter是拖拽事件
<input type="text" name="name" οnpaste="return false" οndragenter="return false" >