Hallo,
ich bin ein Anfänger und habe ein Problem mit der Darstellung des Wertes eines Buttons. Ich habe unten ein Beispiel vorbereitet.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
<!--
input.button {
color: #000000; background: #800080;
border: solid 1px #800080;width:120px;
}
-->
</style>
<style type="text/css">
<!--
input.button2 {
color: #000000; background: #FFD700;
border: solid 1px #FFD700;width:120px;
}
-->
</style>
<script type="text/javascript" language="JavaScript">
<!--
function toggleMe(a){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display=="none"){
e.style.display="block"
} else {
e.style.display="none"
}
return true;
}
//-->
</script>
</head>
<body>
<h1 align="center">XXX<font size="5">X</font></h1>
<h2 align="center">XX<sup>X-XX</sup></h2>
Text
<br><br>
<input type="button" class="button" onclick="return toggleMe('para01')" value="?">
<br>
<div id="para01" style="display:none">
<br>
<input type="button" class="button2" onclick="return toggleMe('para01a')" value="?">
<div id="para01a" style="display:none">
<br>
<font>
Text
<br>
</font>
<br>
</div>
<input type="button" class="button2" onclick="return toggleMe('para01b')" value="?">
<div id="para01b" style="display:none">
<br>
<font>
Text
</font>
</div>
<p></p>
Text
</div>
<br>
</body>
</html>
Ich möchte, dass der Wert genauso dargestellt wird wie bei den Überschriften, wobei das X für eine beliebige Zahl steht.
Browser: Firefox 3.6.10
Ist das möglich? Wenn ja, wie?
Danke im Voraus für eure Hilfe
lg. Bernhard H