What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-27 22:25:20
javascript download string as file
function download(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('download', filename); element.style.display = 'none'; ... Add solution -
Javascript 2022-03-27 11:55:30
github react starter disques
import React from 'react'; import PropTypes from 'prop-types'; const SHORTNAME = 'example'; const WEBSITE_URL = 'http://www.example.com'; function renderDisqus() { if (window.DISQUS === undefined) { var script = document.createElement('script'); ... Add solution -
Javascript 2022-03-16 20:15:02
how to create table using DOM
function render(){ for (let i = 0; i < allMovie.length; i++) { tr = document.createElement('tr'); tr.setAttribute("class", "mainTR"); table.appendChild(tr); var td1 = document.createElement('td'); td1.textConten... Add solution -
Javascript 2022-03-13 00:40:15
dom create element
let myElm = document.createElement("p"); // Create a new element myElm.innerText = 'test'; // Change the text of the element myElm.style.color = 'red'; // Change the text color of the element document.body.appendChild(myElm); // Add the obje... Add solution -
Javascript 2022-03-05 14:20:13
print array list to a ul list
var messageGen = function() { var forecastByHour = [32, 15, 19, 25, 21]; for (var i =0; i <= forecastByHour.length; i++) { var temp = forecastByHour[i]; var message = "On the " + [i] + " hour the expected forcase is to be" + t... Add solution -
Javascript 2022-03-05 13:00:02
javascript download file
function download(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('download', filename); element.style.display = 'none'; ... Add solution -
Other 2022-03-05 12:20:02
copy clipboard with span
document.getElementById("cp_btn").addEventListener("click", copy_password); function copy_password() { var copyText = document.getElementById("pwd_spn"); var textArea = document.createElement("textarea"); ... Add solution