javascript auf dem iPhone?

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • javascript auf dem iPhone?

    Hallo Leute,

    hab nem kumpel einen "Hochzeitscountdown" gebastelt mit dem er auch ne große freude hat. Doch leider funktioniert er auf dem iPhone nicht. Leider hab ich selbst keines und kann es somit nicht testen. Ist Javascript auf dem iPhone (in Safari) deaktiviert oder muss man sonst was beachten?

    würde mich über tipps freuen

    Danke

    gritsch-soft.com/mirko

    HTML-Quellcode

    1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    2. <html xmlns="http://www.w3.org/1999/xhtml">
    3. <head>
    4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    5. <title>Hochzeitscountdown</title>
    6. <style type="text/css">
    7. #imagePos {
    8. margin: -237.5px 0 0 -180px;
    9. position:absolute;
    10. top: 50%;
    11. left: 50%;
    12. width: 360px;
    13. height: 275px;
    14. }
    15. </style>
    16. </head>
    17. <body bgcolor="green" style="overflow:hidden; min-height:100%">
    18. <div id="imagePos" align="center">
    19. <img src="ehe.gif" alt="Gabriel Gritsch Software Development" width="360" height="275"/>
    20. <br/><br/><br/>
    21. <span id="c1" style="font:bold 30px Arial; color:black;"></span><br>
    22. <span id="c2" style="font:bold 24px Arial; color:black;"></span><br>
    23. <span id="c3" style="font:bold 11px Arial; color:black;"><br/>bis 20. Juni 2009 um 14:00</span><br>
    24. </div>
    25. </body>
    26. <script type='text/javascript'>
    27. var end = new Date('June 20, 2009 14:00:00');
    28. function toSt2(n)
    29. {
    30. s = '';
    31. if (n < 10) s += '0';
    32. return (s + n).toString();
    33. }
    34. function toSt3(n)
    35. {
    36. s = '';
    37. if (n < 10) s += '00';
    38. else if (n < 100) s += '0';
    39. return (s + n).toString();
    40. }
    41. function countdown()
    42. {
    43. d = new Date();
    44. count = Math.floor(end.getTime() - d.getTime());
    45. if(count > 0) {
    46. miliseconds = toSt3(count%1000); count = Math.floor(count/1000);
    47. seconds = toSt2(count%60); count = Math.floor(count/60);
    48. minutes = toSt2(count%60); count = Math.floor(count/60);
    49. hours = toSt2(count%24); count = Math.floor(count/24);
    50. days = count;
    51. document.getElementById('c1').innerHTML = days + ' TAGE';
    52. document.getElementById('c2').innerHTML = hours + ':' + minutes + ':' + seconds + '.' + miliseconds;
    53. setTimeout('countdown()', 100);
    54. }
    55. }
    56. countdown();
    57. </script>
    58. </html>
    Alles anzeigen