I would like to get the value from textbox when I click right-click > paste.
当我点击右键单击>粘贴时,我想从文本框中获取值。
$('#searchbox').bind('paste', function (e) {
alert($('#searchbox').val());
});
that's code doesn't complete my solution.
那个代码没有完成我的解决方案。
1 个解决方案
#1
6
Try
$('#searchbox').bind('paste', function (e) {
setTimeout(getTextValue, 10);
});
function getTextValue() {
alert($('#searchbox').val());
}
#1
6
Try
$('#searchbox').bind('paste', function (e) {
setTimeout(getTextValue, 10);
});
function getTextValue() {
alert($('#searchbox').val());
}