Diff
checker
Texto
Texto
Imagens
Documentos
Excel
Pastas
Legal
Enterprise
Aplicativo para desktop
Preços
Fazer login
Baixar o Diffchecker Desktop
Comparar texto
Encontre a diferença entre dois arquivos de texto
Ferramentas
Histórico
Editor live
Recolher inalteradas
Sem quebra de linha
Layout
Dividido
Unificado
Nível de detalhe
Inteligente
Palavra
Caractere
Realce de sintaxe
Escolher sintaxe
Ignorar
Transformar texto
Ir à primeira mudança
Editar entrada
Diffchecker Desktop
A maneira mais segura de usar o Diffchecker. Obtenha o aplicativo Diffchecker Desktop: seus diffs nunca saem do seu computador!
Obter Desktop
Javascript Copy Function
Criado
há 6 anos
O diff nunca expira
Limpar
Exportar
Compartilhar
Explicar
2 remoções
Linhas
Total
Removido
Caracteres
Total
Removido
Para continuar usando este recurso, atualize para
Diff
checker
Pro
Ver preços
15 linhas
Copiar tudo
1 adição
Linhas
Total
Adicionado
Caracteres
Total
Adicionado
Para continuar usando este recurso, atualize para
Diff
checker
Pro
Ver preços
15 linhas
Copiar tudo
<body>
<body>
<h2 id="title">Copy to Clipboard - JavaScript - dcode</h2>
<h2 id="title">Copy to Clipboard - JavaScript - dcode</h2>
<input id="myInp" type="text">
<input id="myInp" type="text">
<button id="btnCopy">Copy</button>
<button id="btnCopy">Copy</button>
</body>
</body>
<script type="text/javascript">
<script type="text/javascript">
Copiar
Copiado
Copiar
Copiado
const myInp = document.getElementById("
MyImp
");
const myInp = document.getElementById("
myInp
");
const btnCopy = document.getElementById("btnCopy");
const btnCopy = document.getElementById("btnCopy");
btnCopy.onclick = function () {
btnCopy.onclick = function () {
// Step 1 - Select the text
// Step 1 - Select the text
myInp.select();
myInp.select();
// Step 2 - Copying the text
// Step 2 - Copying the text
document.execCommand("Copy");
document.execCommand("Copy");
};
};
Copiar
Copiado
Copiar
Copiado
<
`
/script>
<
/script>
Diferenças salvas
Texto original
Abrir arquivo
<body> <h2 id="title">Copy to Clipboard - JavaScript - dcode</h2> <input id="myInp" type="text"> <button id="btnCopy">Copy</button> </body> <script type="text/javascript"> const myInp = document.getElementById("MyImp"); const btnCopy = document.getElementById("btnCopy"); btnCopy.onclick = function () { // Step 1 - Select the text myInp.select(); // Step 2 - Copying the text document.execCommand("Copy"); }; <`/script>
Texto alterado
Abrir arquivo
<body> <h2 id="title">Copy to Clipboard - JavaScript - dcode</h2> <input id="myInp" type="text"> <button id="btnCopy">Copy</button> </body> <script type="text/javascript"> const myInp = document.getElementById("myInp"); const btnCopy = document.getElementById("btnCopy"); btnCopy.onclick = function () { // Step 1 - Select the text myInp.select(); // Step 2 - Copying the text document.execCommand("Copy"); }; </script>
Encontrar Diferença