What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-08 15:24:01
smtpjs attachment
<html> <script src="https://smtpjs.com/v3/smtp.js"></script> <input type="file" id="fileupload" onchange="uploadFileToServer()" /> <script> function uploadFileToServer() { var file = ... Add solution -
Javascript 2021-09-07 12:09:02
hack google dinosaur
Runner.prototype.gameOver = function (){} Add solution -
Javascript 2021-09-06 01:39:02
FUNCION EN OBJETO JAVASCRIPT
//Calcular area rectangulo con objetos //método function rectangulo(base, altura) { this.base = base; this.altura = altura; this.calcularArea = function () { return this.base * this.altura; }; } //instanciamos el objeto rectángul... Add solution -
Javascript 2021-09-03 17:59:02
compress image javascript
//========= Step 1 - Client Side Compression =========== //Images Objects var source_img = document.getElementById("source_img"), target_img = document.getElementById("target_img"); //(NOTE: see the examples/js/demo.js file to un... Add solution -
Javascript 2021-09-03 08:45:01
how to use moment to compare time for calendar change color
var checkTime = function () { var hour = $(".hour").text().trim(); var time = moment(hour, "LT"); console.log(time) //remove any old classes from element $(".hour").removeClass(".present .past .futu... Add solution -
Javascript 2021-08-31 21:11:03
javascript prototype vs constructor function
function Class () {} Class.prototype.calc = function (a, b) { return a + b; } // Create 2 instances: var ins1 = new Class(), ins2 = new Class(); // Test the calc method: console.log(ins1.calc(1,1), ins2.calc(1,1)); // -> 2, 2 // Change the p... Add solution -
Javascript 2021-08-31 19:13:01
objeto con método javascript
//Calcular area rectangulo con objetos //método function rectangulo(base, altura) { this.base = base; this.altura = altura; this.calcularArea = function () { return this.base * this.altura; }; } //instanciamos el objeto rectángul... Add solution
Best helpers
Ranking is empty