dimanche 9 avril 2017

680 animaux




<div style="text-align:center">
<svg id="svgAnim" xmlns="http://www.w3.org/2000/svg" width="385" height="245" ></svg>
<br/>
<button onclick="myFunction77()">Click me !</button>
</div>

<script>
function myFunction77() {
var svgns = "http://www.w3.org/2000/svg";
for (var i = 0; i < 1; i++) {
    var randomString = new Array ();
    randomString[0] = "0";
    randomString[1] = "-245";
    randomString[2] = "-488";
    randomString[3] = "-733";
    randomString[4] = "-978";
    randomString[5] = "-1222";
    randomString[6] = "-1466";
    randomString[7] = "-1710";
    randomString[8] = "-1955";
    randomString[8] = "-2198";
    randomString[9] = "-2443";
    randomString[10] = "-2688";
    randomString[11] = "-2932";
    randomString[12] = "-3176";
    randomString[13] = "-3421";
    randomString[14] = "-3664";
    randomString[15] = "-3908";
    randomString[16] = "-4153";
    var j = Math.floor(16*Math.random());
    var k = Math.floor(16*Math.random());
    var l = Math.floor(16*Math.random());

    var image = document.createElementNS(svgns, 'image');
    image.setAttributeNS(null, 'x', 0);
    image.setAttributeNS(null, 'y', randomString[j]);
    image.setAttributeNS(null, 'width', 126);
    image.setAttributeNS(null, 'height', 4400);
    image.setAttributeNS('http://www.w3.org/1999/xlink', 'href', 'https://lh3.googleusercontent.com/WFcgpC6dKXM3NpIpU6YBlXI2SuF5Lj4Wm1KWtGPVRid30B5NmxFZhVXO7IG0ykQCvgvF-P-0kUr_FhDep8RAXPgUvxbDxcbnzGHUg8s_r91Qpm9EfNtExbAflbpZX1d2wa6Lq1WZ1Agm9ffrUu_moC1Wrza4qt7E59WiNChpQAb4zO7zwL6f5fdmZdxa3TH25uixvbsVybuKEFKpQoSFXpMn-hoJVGOvlWPM2bTCbaDHLqc82PleUFFpBAgoIxWxMkgKreimJS9W8CvBqCNzNt6k-_QJKG5xMXzaZY1O3abIQnWBEhq_wS2Qfgw9dtFPnpev6gGrG7ycotZ72FWgMsCzDiIZ2liBvuv5FtSCeTsHjWQbpTANJm_ROK9Xe9MOPOay26jYuaUXzsV0lnqrx4vLPhCw-sAmVate-FJ-RQLdB50EMJdXjxUfECOaUb2RAOmTfH0GsVoXQlw5oJUcih43UP6PxP1Vehoa_nW-NpD3-9kdYGgq5LIraWNhQrMVbasmdPWk3yIPtRqqdrBHkgi5SLhrtfyCRSz9u4oI983mivsA7NHF1HryI4rAuztcn8S-UBmsl4EeTD5z0tJukl_arTQYORDgBdDEQlIEpBjUQCg=w126-h4400-no');
    document.getElementById('svgAnim').appendChild(image);

    var image = document.createElementNS(svgns, 'image');
    image.setAttributeNS(null, 'x', 126);
    image.setAttributeNS(null, 'y', randomString[k]);
    image.setAttributeNS(null, 'width', 126);
    image.setAttributeNS(null, 'height', 4400);
    image.setAttributeNS('http://www.w3.org/1999/xlink', 'href', 'https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJPa-Kt5RooYR9nnMmS8E-YmOdt_r3YGBYg1w_b2uUmweG8eVcaxYeSQkxElg3u3eMw2zUOJ9tlxtUysRxZHS2178Ru1mq2NycDhvFePKDse1Qpyyf_5RzARoLTx5cpA3SlxNv4SJTPQ/w126-h4400-no/');
    document.getElementById('svgAnim').appendChild(image);

    var image = document.createElementNS(svgns, 'image');
    image.setAttributeNS(null, 'x', 252);
    image.setAttributeNS(null, 'y', randomString[l]);
    image.setAttributeNS(null, 'width', 133);
    image.setAttributeNS(null, 'height', 4400);
    image.setAttributeNS('http://www.w3.org/1999/xlink', 'href', 'https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQSoB6LhXY4fTUHM3TYwzq41IPerWKge6y_iOkCHG2IgZssOxYQc0d7FbVcBvHA7daT1cmjno5aYK0y_dyeA0mvMdd6mvX022M6F1nKcDhzrbtjgdg_equLNSrC0VLHuR452y6mXLaoA/w133-h14400-no/');
    document.getElementById('svgAnim').appendChild(image);

    var rect = document.createElementNS(svgns, 'rect');
    rect.setAttributeNS(null, 'x', 0);
    rect.setAttributeNS(null, 'y', 0);
    rect.setAttributeNS(null, 'width', 385);
    rect.setAttributeNS(null, 'height', 245);
    rect.setAttributeNS(null, 'fill', 'none');
    rect.setAttributeNS(null, 'stroke', 'black');
    rect.setAttributeNS(null, 'stroke-width', 4);
    document.getElementById('svgAnim').appendChild(rect);
}}

</script>