$scope.cdkeyPaste = function(evt) { var content = ‘‘; if( evt.originalEvent.clipboardData ){//chrome靠angular返回兼容 content = (evt.originalEvent || evt).clipboardData.getData(‘text/plain‘); } else if( window.clipboardData ){//ie,ie的剪贴板angular没有返回 content = window.clipboardData.getData(‘Text‘); } }
时间: 2024-10-21 11:16:37