HTML-szerkesztés kezdőknek!!!
-
ateszname #7595 Konkrétan amivel probléma van az az alábbi programkód:
<script language="JavaScript" type="text/javascript">
<!--
function na_preload_img()
{
var img_list = na_preload_img.arguments;
if (document.preloadlist == null)
document.preloadlist = new Array();
var top = document.preloadlist.length;
for (var i=0; i < img_list.length-1; i++) {
document.preloadlist[top+i] = new Image;
document.preloadlist[top+i].src = img_list[i+1];
}
}
function na_change_img_src(name, nsdoc, rpath, preload)
{
var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
if (name == '')
return;
if (img) {
img.altsrc = img.src;
img.src = rpath;
}
}
function na_restore_img_src(name, nsdoc)
{
var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
if (name == '')
return;
if (img && img.altsrc) {
img.src = img.altsrc;
img.altsrc = null;
}
}
// -->
</script></head>
<body onload="na_preload_img(false, 'index/images/ghome_over.jpg', 'index/images/gwork_over.jpg', 'index/images/grooms_over.jpg', 'index/images/gprom_over.jpg', 'index/images/gforum_over.jpg', 'index/images/gcc_over.jpg');">
<table width="990" border="0" cellpadding="0" cellspacing="0">
<tr>
<th height="128" colspan="6" background="index/images/header.jpg" scope="col"> <p> </p>
</th>
</tr>
<tr>
<th scope="row"><a href="main.html" target="main" onmouseout="na_restore_img_src('image1', 'document')" onmouseover="na_change_img_src('image1', 'document', 'index/images/ghome_over.jpg', true)"><img src="index/images/ghome.jpg" width="168" height="70" border="0" name="image1" id="image1" /></a></th>
<td><a href="work.html" target="main" onmouseout="na_restore_img_src('image2', 'document')" onmouseover="na_change_img_src('image2', 'document', 'index/images/gwork_over.jpg', true)"><img src="index/images/gwork.jpg" width="164" height="70" name="image2" id="image2" border="0" /></a></td>
<td><a href="#" onmouseout="na_restore_img_src('image3', 'document')" onmouseover="na_change_img_src('image3', 'document', 'index/images/grooms_over.jpg', true)"><img src="index/images/grooms.jpg" width="163" height="70" border="0" name="image3" id="image3" /></a></td>
<td><a href="#" onmouseout="na_restore_img_src('image4', 'document')" onmouseover="na_change_img_src('image4', 'document', 'index/images/gprom_over.jpg', true)"><img src="index/images/gprom.jpg" width="164" height="70" border="0" name="image4" id="image4" /></a></td>
<td><a href="#" onmouseout="na_restore_img_src('image5', 'document')" onmouseover="na_change_img_src('image5', 'document', 'index/images/gforum_over.jpg', true)"><img src="index/images/gforum.jpg" width="164" height="70" border="0" name="image5" id="image5" /></a></td>
<td><a href="cc.html" target="main" onmouseout="na_restore_img_src('image6', 'document')" onmouseover="na_change_img_src('image6', 'document', 'index/images/gcc_over.jpg', true)"><img src="index/images/gcc.jpg" width="167" height="70" border="0" name="image6" id="image6" /></a></td>
</tr>
</table>
</body>
</html>
Van ebben valami olyan hiba ami miatt nem működik?
Ma próbáltam flash-be megcsinálni a gombokat, swf-ben elmentve, és azzal is ugyanez volt a gond.
Tudnátok esetleg valami más megoldást az onmousover-es gomb beszúrására?