Autor Beitrag
Xerox
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 45

WinXP Pro, WinMe
D7 Pers
BeitragVerfasst: Mo 26.06.06 13:33 
hallo Leute!

bräuchte dringend eure Hilfe! Hab hier einen HTML-Code, in dem ich einen Button erzeuge, und ihn an eine JavaSkript Funktion übergebe. Wie kann ich in der Funktion die Farbe des übergebenen Objekts (hier die des Buttons) ändern????

hier der Code:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
<html>
   <head>
      <title>Enter the title of your HTML document here</title>
      <script type="text/JavaScript">
  
      function changeColor(button){
      
                  <!-- Hier soll die farbe geändert werden! -->  
                  window.alert("changeColor()");
                 
      }

      </script>
   </head>
   <body>
      <input type="button" value="button1" onclick="changeColor(this)"></input>
   </body>
</html>



MFG
Und Danke im Voraus!
Bastian

Moderiert von user profile iconjasocul: Code-Tags hinzugefügt
rizla
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 417
Erhaltene Danke: 2

XP
FPC mit Lazarus
BeitragVerfasst: Mo 26.06.06 14:21 

_________________
if you have what they want - they'll find a way to take it (bruce sterling)
WOW - 10 JAHRE Mitglied beim Delphi-Forum. Wie die Zeit vergeht, Freunde.