Dieser Artikel beschreibt die einfache Implementierung von JS zum Kopieren von Links. Teilen Sie es für Ihre Referenz wie folgt weiter:
<! DocType html public "-// w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transsitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>Click on the copy link</title></head><body><input type="text" size="30" id="url" value = "// www.vevb.com/"><Input type =" button "value =" link 1 "onclick =" copyurl () "> <script type =" text/javaScript "> Funktion copyUrl () {var url = document.getElementById (" url "). Value; window.clipboardData.setData ("Text", URL); alert ("Link Erfolg kopieren!");} </script> <input type = "button" value = "link 2" onclick = "url.select (); document.execcommand ('copy')"> <br/> <br/> Wulin.com bietet zwei einfache Möglichkeiten, Links zu kopieren. Ich glaube, es gibt immer einen, der zu Ihnen passt.For more information about JavaScript related content, please check out the topics of this site: "Summary of JSON operation skills in JavaScript", "Summary of JavaScript switching effects and techniques", "Summary of JavaScript search algorithm skills", "Summary of JavaScript animation special effects and techniques", "Summary of JavaScript errors and debugging skills", "Summary of JavaScript data structures and Algorithmusfähigkeiten "," Zusammenfassung von JavaScript -Traversal -Algorithmen und -Techniken "und" Zusammenfassung der Verwendung von JavaScript mathematischer Operationen ""
Ich hoffe, dieser Artikel wird für JavaScript -Programme aller hilfreich sein.