jeudi 22 février 2018
Horror Faces
<svg height="400" id="svgFace2" onclick="myFunction16();" width="400"></svg>
<script>
function myFunction16() {
var randomString0 = new Array ();
randomString0[0] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeG_gsih5yDJQukRi81fil9QvriAb00prs4cywY5NQ0IwkmxtbE-wr7YhBuWZlkJILm39pmRIZQ1NoA9MGsn793R7_zcTj2ELhh1XWAnzSJpw2VBgdYUaJEtaq1y-4kj5arDKdhIhYkA/s1600/f1.png";
randomString0[1] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2ffyM7aQ4H8z3r_c5wAeLKsRt5-UCzjLvRKA9CfyEhrRPLYdkWPKnyfK-GYbTTJoTPT1ZNOIsdjGpvweTDJfShUdxG5qVw5-MCeg61QNohZfZ2Pxki_x8ejUvzwFdupVDF9wm0BFLnw/s1600/f2.png";
randomString0[2] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSM6jQhxi3l7FzhYcs9tD2xuz-WGhvQipqPsy-HxXgWm0O-yVR4zc7UfxwlnvU80kL0N7ADMLsMzC152UMtrm9781XPJn3Axy6Ilx_t2cuy_GXq3susNgD5Fr6eNJwMbJFlS-ff0awncM/s1600/f3.png";
randomString0[3] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwh9mDf-7Htz8CuYfdMegpe_VkkDwYxxFPeJ6pUGLPJTvbiZaaOONH0csAfvj_2CQgGv-vIAGZC9Ynd-2swjmRVgzPswgdfzUI-XyaihyphenhyphenSz8ezM6eNFpvdld8BnONhWRLLxU8kPU3dljo/s1600/f4.png";
randomString0[4] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSvqC9_Rbrhx9rl7mc20R8eCfRqhq3ZJ9sb8nXQCsAMSl_erS6ZRXBl64TidhhhHF9El0oa1INUX91CSEL1b8sSPv37YmzWoaZLSJkNXPXEbq39gHtNuXkmqvO9krYvEmnwyfe9f-dI4E/s1600/f5.png";
randomString0[5] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXKerKgWm_zeI0A3w2wIhWyVKfv1X80lbhAUuJFvFlTvMTqBrylJFkRQtIKhNKKazSJ7Ab5AZIBS5gjihUaPbW7uh1q077g7Mg_g5vLekf6KL7lA_QZZz3kgwPnNEVE9Tl4eoyVhyphenhyphenjTUY/s1600/f6.png";
var face = Math.floor(6*Math.random());
var image0 = document.createElementNS(svgFace2.namespaceURI, 'image');
image0.setAttributeNS(null, 'x', 0);
image0.setAttributeNS(null, 'y', 0);
image0.setAttributeNS(null, 'width', 400);
image0.setAttributeNS(null, 'height', 400);
image0.setAttributeNS('http://www.w3.org/1999/xlink', 'href', randomString0[face]);
var randomString1 = new Array ();
randomString1[0] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2vCNo6kI1Os4tc5ZByldssibn3Ih5fLsfqQc72OoSI07-FusXOgaCD8FJsmlQlTt1rYbc1YMDQF7YT-y278E-AZtevZNoiJpEgQwpnB-oi3PfDoilZYAy3tIXsuUhOMFfwHClc-LXKbQ/s1600/y1.png";
randomString1[1] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-UnY_MxAMesOekXRoo_0VJgtjGIBP_T8GNodRleVLqweDS2PEcKXHutXb8lF93vCrLV_P_XjsAseAgFZzNSEvRSrsCqNtJntSnlXFx0bJCPhj_ko2nBrkJDct3lmY5iZx9-ZpYpINhsE/s1600/y2.png";
randomString1[2] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3zfejF-YwVvFaXKERAgNgsgXyq9HjT1W_VWhI2VHB7bMCChyphenhyphen-ACsbpBJucxAQrr49lIpZRelQ-BTfp0x8pGybLGx0RiWa3_x-g9H7wDDh-LXAiiCI3ptX0uI5OkmnQbBJOzQlB4BDcLA/s1600/y3.png";
randomString1[3] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCdCrpRyM3869nn_o8tVrlToc3ESz4FwV83VvSd1ttGKFz7ZsjM5bPaiHlyXr4lXdHkQv-fmilG7rZKpHK0MoIE_o1ktgcJV2Lq0muPPkRuoR1BIGDZLet8kzFxcljAxrkZV9p5ve83tc/s1600/y4.png";
randomString1[4] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_g8QYNNjRnpKSxxbbe7wqEfS5q3cOiJvSBtIlT1Nnu45ZT9fV5IDxTcBgliVc9iULhCJZJfscrUG86ziSHPjo6uhHJA__3iP600pe0KZrKxakjfXvCG6_fIioc_qTdy2VMDoKKzDFsmg/s1600/y5.png";
randomString1[5] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUgXJ6jjz92h1ZXLBOG1WSDJAnB7Ab2PbvTZYW4kbztW4JwdqqdHSOuPPiz0N6_8QknDWSykzZCfV2bCqtuHHE3Rg0FjXhgAuzFVVCwXCGFjPP1bwLnN0KjrNmPglMYzfsmgWKZUJSaT4/s1600/y6.png";
var yeux = Math.floor(6*Math.random());
var image1 = document.createElementNS(svgFace2.namespaceURI, 'image');
image1.setAttributeNS(null, 'x', 0);
image1.setAttributeNS(null, 'y', 0);
image1.setAttributeNS(null, 'width', 400);
image1.setAttributeNS(null, 'height', 400);
image1.setAttributeNS('http://www.w3.org/1999/xlink', 'href', randomString1[yeux]);
var randomString2 = new Array ();
randomString1[0] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi93XKnM1H9HxUSLQixXDdJ4RNGSB5Xm0_Q7hG-rnFt0d-ZQEics1fghkJ4EjCSlSxW9Hmi7mKT32BSBgY8fihGRvQVstUDe1Yn9zdsj05pp75YSuv3Y1q4gwINBVjaJ4Ujb7x2atvBiI4/s1600/b1.png";
randomString1[1] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRPsLb_W68-x9gJ6ZXYC9GfVTx2_43G0-R0zMf3Z8o60a0P5Nha4YnSdDd9-67ULGiSUFqG8kjQSO-3brigiR0zQ8DOIZZii72NS_8tzR6Mhd9f7qfo3lAFsQZ5bPkjis491mGeOjmSOs/s1600/b2.png";
randomString1[2] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh18h9WnudvOylEDVp_BP29Du_5j-OLfcde095nfdqVd-KpgkY3tTYKv-XKp72xn00mKHvJynR_qNNVSK7HflBPkj2gglo_sO-J-fp8-rsq9OO7MrICnRh6kroXD1zuCKMgnWJ0afHQqmA/s1600/b3.png";
randomString1[3] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjojC7Pw5Xh7kttj4tUWr7ExBEwISjOlIii_6ri44IWPSNha5G28ldwgHoBuIOGR9MiyEHIThe5yS1EO7vvX48j7aS3uN96xLUiGa8p2yC91fz-0DUWV00HT-VneHQnMtVSP3yURGDS-4w/s1600/b4.png";
randomString1[4] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiPku0ozVd0DnXP3RM3Fam4S_fLttAU7o1ip4UlAXblOqLEOzZoC2oMcY1hDPdF5kfRawKD6KBN3bfeUYN-kDwipmFTZvZv6qHFPKYpyMWyffED_TJ7OAX4Mbbp3k6kRkYaEosvsY_4ZE/s1600/b5.png";
randomString1[5] = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLHvLFdKHHlcNdvm58DjtdSq4n4FspFkxgNUHB0g-muoaXczGIBhpndNH4dDYftwIu-r50r47UR-jRIxl-dMAc2RGT_KiFxfbhPuai9wtaAZf_R7tsC6zGqcKXapAD16wAmunkAuUkwjs/s1600/b6.png";
var bouche = Math.floor(6*Math.random());
var image2 = document.createElementNS(svgFace2.namespaceURI, 'image');
image2.setAttributeNS(null, 'x', 0);
image2.setAttributeNS(null, 'y', 0);
image2.setAttributeNS(null, 'width', 400);
image2.setAttributeNS(null, 'height', 400);
image2.setAttributeNS('http://www.w3.org/1999/xlink', 'href', randomString1[bouche]);
svgFace2.appendChild(image0);
svgFace2.appendChild(image1);
svgFace2.appendChild(image2);
}
myFunction16();
</script>
-
Animation attribute (width, opacity, etc.) <animate attributeName="?" begin="0s" dur="6s" repeatCount...
-
Generate