BREAKING NEWS
latest
Main Menu
Home
Technical Support
Blogger Tutorials
Earn Money
JavaScript
Subscribe Author On YouTube [Click Here>>]
Monday, June 22, 2020
Home
JavaScript
How to show code on blogger with a copy snippet button
How to show code on blogger with a copy snippet button
Sir Chogyal
-
Copy the code below and past inside your html page. You can replace "YOUR CODE GOES HERE" with your code that you wanna show.
<textarea style="border-style: solid; border-width: 1px 1px 1px 20px; border-color: #4072a1; width: 100%; height: 321px; line-height: 16px; resize: none;" id="html1" readonly>YOUR CODE GOES HERE</textarea><div style="font-size:13px; font-family: comic sans ms; color: blue;"><button onclick="copyThis1()">Copy code snippet</button></div> <script> function copyThis1() { var copyText = document.getElementById("html1"); copyText.select(); copyText.setSelectionRange(0, 99999) document.execCommand("copy"); alert("Code snippet copied to clipboard"); } </script>
Copy code snippet
You Might Also Like
JavaScript
« PREV
NEXT »
No comments
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments ( Atom )
Subscribe by Email
|
YouTube
|
Facebook
|
Instagram
|
Twitter
Learning JavaScript Quickly
Subscribe by Email
|
YouTube
|
Facebook
|
Instagram
|
Twitter
No comments
Post a Comment