What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-22 13:29:07
JSDOM - serialize() // returns dom as string
const dom = new JSDOM(`<!DOCTYPE html>hello`); dom.serialize() === "<!DOCTYPE html><html><head></head><body>hello</body></html>"; // Contrast with: dom.window.document.documentElement.outerHTML =... Add solution -
PHP 2021-10-20 16:08:05
php magic methods
/* The following function names are magical in PHP classes. You cannot have functions with these names in any of your classes unless you want the magic functionality associated with them. */ __construct(), __destruct(), __call(), __callStatic(), __... Add solution -
PHP 2021-10-10 00:26:05
magic method get php
/* The following function names are magical in PHP classes. You cannot have functions with these names in any of your classes unless you want the magic functionality associated with them. */ __construct(), __destruct(), __call(), __callStatic(), __... Add solution -
-
Javascript 2021-09-27 09:33:02
jquery on form submit call function
$(document).ready(function() { $("your form selector here").submit(function() { // do the extra stuff here $.ajax({ type: "POST", url: "mail.php", data: $(this).serialize(), success: functio... Add solution -
Javascript 2021-09-18 13:13:02
get form data in js
$('form').serializeArray() // gives // [ {"name":"foo","value":"1"}, // {"name":"bar","value":"xxx"}, // {"name":"this","value":"hi"... Add solution