What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-08-31 08:30:03
how to get all scripts on a page javascript
var scripts = document.getElementsByTagName("script"); for (var i = 0; i < scripts.length; i++) { if (scripts[i].src) { console.log(i, scripts[i].src); } else { console.log(i, scripts[i].innerHTML); } Add solution -
C 2021-08-31 06:11:01
how can i show ant text by onclick
<!DOCTYPE html> <html> <body> <h2>Displaying text when clicked</h2> <button type="button" onclick="document.getElementById('demo').innerHTML = 'These are the steps to get your PIN number: Bla bla bla'"... Add solution -
Javascript 2021-08-31 05:14:02
change iframe src by javascript
// so you got an iframe (id="myiframe"). In that page you have an element id="theprice" and you want to change its value // from the parent page do this in your javascript: var iframevar = document.getElementById('myiframe'); var elmnt... Add solution -
Javascript 2021-08-30 22:38:03
javascript password matching
let pass1 = document.getElementById("pass-one"); let pass2 = document.getElementById("pass-two"); let run = document.getElementById("run"); run.addEventListener("click", function () { if (pa... Add solution -
Html 2021-08-30 03:09:02
html timestamp
<!DOCTYPE html> <html> <body> <h1>Event timeStamp</h1> <p>Click the button to get the number of milliseconds from this document was loaded until the button was clicked.</p> <button onclick="myFunction(e... Add solution -
Javascript 2021-08-29 17:39:02
javascript innerhtml table
document.getElementById("myelement").innerHTML='<table id="mytable"><thead><tr><th>Row 1 - Column 1 - Header</th><th>Row 1 - Column 2 - Header</th></tr><thead><tr><td>Ro... Add solution -
Javascript 2021-08-29 09:06:01
edit html javascript
element.innerHTML = "<p>read this</p>" Change the inner HTML of an element element.style.color = "blue"; Change the style of an HTML element element.setAttribute(important, "true") Change the attribute value of... Add solution -
Javascript 2021-08-28 08:15:01
javascript add text to bold tag
TextBox.innerHTML = "Hello"; Add solution