抓住粘貼輸入 - Catch paste input

問題:

I'm looking for a way to sanitize input that I paste into the browser, is this possible to do with jQuery? 我正在尋找一種方法來清理我粘貼到瀏覽器中的輸入,這可能與jQuery有關嗎?

I've managed to come up with this so far: 到目前爲止,我已經設法做到了這一點:

$(this).live(pasteEventName, function(e) {
 // this is where i would like to sanitize my input
 return false;
}

Unfortunately my development has come to a screeching hold because of this "minor" issue. 不幸的是,由於這個“次要”問題,我的發展已經開始戛然而止。 I would really make me a happy camper if someone could point me to the right direction. 如果有人能指出我正確的方向,我真的會讓我成爲一個快樂的露營者。


解決方案:

參考一: https://en.stackoom.com/question/2siZ
參考二: https://stackoom.com/question/2siZ
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章