lancelot65
New member
Hi!!
Ich bastele gerade an meiner ersten HP und fand bei Mailer diesen Javascript:
<title>CSS-Buttons</title>
<SCRIPT LANGUAGE="JavaScript">
<!-- Menu Buttons Part:1 Paste in Head -->
<script language="JavaScript">
<!-- IE and NS6 Menu Button script kurt.grigg@virgin.net
if (!document.layers){
// Choose size and colours here!!!!!!!!!!!!!!!!!!!!!!!!!!
Width=100;
Font='Verdana';
FontSize=12;
AFontColor='#ffffff';
BFontColor='#ffffff';
CFontColor='#ffffff';
FontWeight='normal'; //normal or bold!
BackGround='#0080ff'; //Same as your body bgcolor!
BorderDepth=1;
BorderLight='#00ccff';
BorderShad='#000000';
//Nothing needs altering past here!!!!!!!!!!!!!!!!!!!!!!
function On(id){
with(id.style){
color=BFontColor;
borderTopColor=BorderLight;
borderLeftColor=BorderLight;
borderRightColor=BorderShad;
borderBottomColor=BorderShad;
}
}
function Off(id){
with(id.style){
color=AFontColor;
borderTopColor=BackGround;
borderLeftColor=BackGround;
borderRightColor=BackGround;
borderBottomColor=BackGround;
}
}
function Down(id){
with(id.style){
color=CFontColor;
borderTopColor=BorderShad;
borderLeftColor=BorderShad;
borderRightColor=BorderLight;
borderBottomColor=BorderLight;
}
}
function Link(Url,Txt){
document.write("<a href='"+Url+"'>"
+"<div style='position:relative;"
+"width:"+Width+"px;height:"+FontSize+"px;"
+"border-width:"+BorderDepth+"px;"
+"border-color:"+BackGround+";"
+"border-style:solid;"
+"padding:"+FontSize/3+"px;"
+"background:"+BackGround+";"
+"font-family:"+Font+";"
+"font-size:"+FontSize+"px;"
+"line-height:"+FontSize*1.2+"px;"
+"font-weight:"+FontWeight+";"
+"text-align:left;"
+"color:"+AFontColor+";"
+"margin-top:2px;"
+"cursor:hand'"
+"onMouseOver='javascript:On(this)'"
+"onMouseOut='javascript:Off(this)'"
+"onMouseDown='javascript
own(this)'>"
+Txt+"</div></a>");
}
}
function Temp(){
alert("TEST");
}
//-->
</script>
<!-- End Menu Buttons Part:1 -->
<!-- Menu Buttons Part:2 Paste in Body where needed -->
<script language="JavaScript">
<!--
if (!document.layers){
//This table stops oddness in NS6!!!
if (document.getElementById&&!document.all){
document.write("<div style='position:relative'>"
+"<table border='0' cellpadding='0' cellspacing='0'>"
+"<tr><td valign='top'>");
}
/* The visible Buttons here!
Add as many as you want. Make sure
you follow the same format as below
*/
Link('javascript:Temp()','Yahoo');
Link('javascript:Temp()','Google');
Link('javascript:Temp()','Alta Vista');
Link('javascript:Temp()','Lycos');
Link('javascript:Temp()','Hotbot');
if (document.getElementById&&!document.all){
document.write("</td></tr></table></div>");
}
}
//-->
</script>
<!-- End Menu Buttons Part:2 -->
</body>
</html>
Das mit der Beschriftung und den Farben ist kein Problem....
...aber, was muss ich eingeben, um die Buttons zu den entsprechenden Seiten zu verlinken????
Ich habe da etwas herumprobiert und habs nicht hinbekommen!! In Selfhtml konnte ich auch nichts finden.
Vielen Dank für die Hilfe!!!
MfG
Ich bastele gerade an meiner ersten HP und fand bei Mailer diesen Javascript:
<title>CSS-Buttons</title>
<SCRIPT LANGUAGE="JavaScript">
<!-- Menu Buttons Part:1 Paste in Head -->
<script language="JavaScript">
<!-- IE and NS6 Menu Button script kurt.grigg@virgin.net
if (!document.layers){
// Choose size and colours here!!!!!!!!!!!!!!!!!!!!!!!!!!
Width=100;
Font='Verdana';
FontSize=12;
AFontColor='#ffffff';
BFontColor='#ffffff';
CFontColor='#ffffff';
FontWeight='normal'; //normal or bold!
BackGround='#0080ff'; //Same as your body bgcolor!
BorderDepth=1;
BorderLight='#00ccff';
BorderShad='#000000';
//Nothing needs altering past here!!!!!!!!!!!!!!!!!!!!!!
function On(id){
with(id.style){
color=BFontColor;
borderTopColor=BorderLight;
borderLeftColor=BorderLight;
borderRightColor=BorderShad;
borderBottomColor=BorderShad;
}
}
function Off(id){
with(id.style){
color=AFontColor;
borderTopColor=BackGround;
borderLeftColor=BackGround;
borderRightColor=BackGround;
borderBottomColor=BackGround;
}
}
function Down(id){
with(id.style){
color=CFontColor;
borderTopColor=BorderShad;
borderLeftColor=BorderShad;
borderRightColor=BorderLight;
borderBottomColor=BorderLight;
}
}
function Link(Url,Txt){
document.write("<a href='"+Url+"'>"
+"<div style='position:relative;"
+"width:"+Width+"px;height:"+FontSize+"px;"
+"border-width:"+BorderDepth+"px;"
+"border-color:"+BackGround+";"
+"border-style:solid;"
+"padding:"+FontSize/3+"px;"
+"background:"+BackGround+";"
+"font-family:"+Font+";"
+"font-size:"+FontSize+"px;"
+"line-height:"+FontSize*1.2+"px;"
+"font-weight:"+FontWeight+";"
+"text-align:left;"
+"color:"+AFontColor+";"
+"margin-top:2px;"
+"cursor:hand'"
+"onMouseOver='javascript:On(this)'"
+"onMouseOut='javascript:Off(this)'"
+"onMouseDown='javascript
+Txt+"</div></a>");
}
}
function Temp(){
alert("TEST");
}
//-->
</script>
<!-- End Menu Buttons Part:1 -->
<!-- Menu Buttons Part:2 Paste in Body where needed -->
<script language="JavaScript">
<!--
if (!document.layers){
//This table stops oddness in NS6!!!
if (document.getElementById&&!document.all){
document.write("<div style='position:relative'>"
+"<table border='0' cellpadding='0' cellspacing='0'>"
+"<tr><td valign='top'>");
}
/* The visible Buttons here!
Add as many as you want. Make sure
you follow the same format as below
*/
Link('javascript:Temp()','Yahoo');
Link('javascript:Temp()','Google');
Link('javascript:Temp()','Alta Vista');
Link('javascript:Temp()','Lycos');
Link('javascript:Temp()','Hotbot');
if (document.getElementById&&!document.all){
document.write("</td></tr></table></div>");
}
}
//-->
</script>
<!-- End Menu Buttons Part:2 -->
</body>
</html>
Das mit der Beschriftung und den Farben ist kein Problem....
...aber, was muss ich eingeben, um die Buttons zu den entsprechenden Seiten zu verlinken????
Ich habe da etwas herumprobiert und habs nicht hinbekommen!! In Selfhtml konnte ich auch nichts finden.
Vielen Dank für die Hilfe!!!
MfG