Keywords: Animated analog SVG clock.svg ValidSVG de Animierte analoge SVG-Uhr en Animated analog SVG clock Animated SVG own en Based on http //salestores com/stores/images/images_747/WT3143A jpg this master image de Basierend auf http //salestores com/stores/images/images_747/WT3143A jpg dieser Bildvorlage Fleshgrinder 18 16 11 November 2010 UTC Fleshgrinder en To display the client's current system time uncomment the JavaScript within the SVG It ™s not possible to upload the file with the JavaScript “ security reasons You can have a look at a working example http //static bobdo net/Analog_Clock svg here de Um die aktuelle Systemzeit anzuzeigen unkommentiere das JavaScript in der SVG Es ist nicht möglich die Datei mit dem JavaScript hoch zu laden “ Sicherheitsgründe Ein funktionierendes Beispiel kann http //static bobdo net/Analog_Clock svg hier angesehen werden <div style margin 1em;padding 1em;background f5f5f5;border 1px dashed blue ><syntaxhighlight lang javascript >/ Set the clock to the client's system time directly after the SVG is loaded param evt e / function s e // Create new Date object var d new Date ; // Get current seconds var s d getSeconds ; // Get current minutes and add the current second var m d getMinutes + s / 60; // Get current hours and add the current minute var h d getHours + m / 60; // Get the current document so we can alter the DOM var svg e target ownerDocument; // Rotate the second clockhand to the current seconds svg getElementById Second setAttribute transform rotate + s 6 + 256 256 ; svg getElementById SecondShadow setAttribute transform rotate + s 6 + 253 259 ; // Rotate the minute clockhand to the current minute svg getElementById Minute setAttribute transform rotate + m 6 + 256 256 ; svg getElementById MinuteShadow setAttribute transform rotate + m 6 + 254 258 ; // Rotate the hour clockhand to the current hour svg getElementById Hour setAttribute transform rotate + h 30 + 256 256 ; svg getElementById HourShadow setAttribute transform rotate + h 30 + 255 257 ; </syntaxhighlight></div> Animated SVG Animated clock images |