lướt chuột đến thì chú thích hiện lên ??? vd: đưa chuột đến 1 link nào đó thì bên cạnh link đó sẽ hiện lên những dòng chú thích theo ý mình ! làm sao để được như vậy nhỉ?
Trong javascript tạo 1 function để hiện thỉ dòng chú thích bằng cách sử dụng innerHTML hoặc innerText để chèn vào . Sử dụng onMouseOver của Javascript chạy function trên trong thẻ <a> của Link đó, rồi tạo thêm 1 thẻ <div> phía sau link đó .
chà ! mình mới vào nghề nên bạn nói thế thì mình chịu ! Có thể hướng dẫn kĩ 1 chút cho mình được không ?
Bạn có thể tham khảo đoạn code sau : Mã: <!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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script language="javascript"> function addText() { window.document.all.link.innerHTML = "<b>Donwload Zone</b>"; } function clearText() { window.document.all.link.innerHTML = ""; } </script> </head> <body> <a href="http://downz.no-ip.info" onmouseover="addText();" onmouseout="clearText();">Download Zone - Sharing Software - EBook </a><div id="link"></div> </body> </html> Chú ý đoạn : Mã: <script language="javascript"> function addText() { window.document.all.link.innerHTML = "<b>Donwload Zone</b>"; } Chữ link ở đây là id của thẻ Div . nếu bạn đặt id khác thì thay đổi nó . window.document.all là do thẻ div ko nằm trong 1 form nào cả , nếu có thì thay thế từ all bằng tên form . bạn có thể sử dụng innerHTML để chèn các đoạn code theo ngôn ngữ HTML vào , nếu ko có thể sử dụng innerText , tức là chỉ hiện text thui .
không ngờ chỉ có hiện cái chú thích mà phức tạp dữ vậy :( mới vào nghề nên chửa có biết innerText là gì nói gì đến sử dụng innerText thế là không làm được rồi ! làm sao bây giờ
thử đi thử lại bao giờ ra thì thôi đừng vội nản thế ! chúc thành công :hug: mà bạn muốn hiện chú thích trên cái gì , phải nói rõ chứ !
thoi ráng đi, đâu trang web của bạn đâu na`o, mình cũng đang học làm web đây, sẵn trang web mình mới làm có gì giúp đỡ nha http://mukundun.uni.cc
bạn ơi web của bạn có cái banner và bài hết rất hay nhưng bố cục thì ... bạn có thể tham khảo cái source của GVN nầy ấy :) cũng cool lắm :) nữa .. bạn muốn chống viewsource ? đừng dùng cách hiện nay vì vẫn view được như thường !nếu bạn muốn sẽ mình cho bạn cái code chống view (chỉ có tác dụng với những người nghiệp dư thôi nhé ,còn bọn pro thì chịu )
bạn cho mình code chống view đi, co`n làm chú thích ở trên đó sao phức tạp quá, bạn có thể hướng dẫn cụ thể cho mình được ko?
code chống view hả ? ok thôi : Mã: <script language="javascript"> menuItems = new Array(); menuItemNum = 0; function addMenuItem(text, url, img){ if(img) menuItems[menuItemNum] = new Array(text, url, img); else if(text) menuItems[menuItemNum] = new Array(text, url); else menuItems[menuItemNum] = new Array(); menuItemNum++; } menuWidth = 1; //menu width menuHeight = 1; //menu height menuDelay = 50; //delay before menu appears menuSpeed = 8; //speed which menu appears (lower=faster) menuOffset = 2; //offset of menu from mouse pointer addMenuItem("","",""); addMenuItem("","",""); addMenuItem(); addMenuItem("","",""); //-------------------------------------------------------------------------------------------- if(window.navigator.appName == "Microsoft Internet Explorer" && window.navigator.appVersion.substring(window.navigator.appVersion.indexOf("MSIE") + 5, window.navigator.appVersion.indexOf("MSIE") + 8) >= 5.5) isIe = 1; else isIe = 0; if(isIe){ menuContent = '<tr height="1"><td style="background:threedlightshadow" colspan="4"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threedlightshadow"></td><td style="background:threedhighlight" colspan="2"></td><td style="background:threeddarkshadow"></td></tr><tr height="10"><td style="background:threedlightshadow"></td><td style="background:threedhighlight"></td><td style="background:threedface"><table cellspacing="0" cellpadding="0" nowrap style="font:menu;color:menutext;cursor:hand;">'; for(m=0;m<menuItems.length;m++){ if(menuItems[m][0] && menuItems[m][2]) menuContent += '<tr height="17" onMouseOver="this.style.background=\'highlight\';this.style.color=\'highlighttext\';" onMouseOut="this.style.background=\'threedface\';this.style.color=\'menutext\';" onClick="parent.window.location.href=\'' + menuItems[m][1] + '\'"><td style="background:threedface" width="1" nowrap></td><td width="21" nowrap><img src="' + menuItems[m][2] + '"></td><td nowrap>' + menuItems[m][0] + '</td><td width="21" nowrap></td><td style="background:threedface" width="1" nowrap></td></tr>'; else if(menuItems[m][0]) menuContent += '<tr height="17" onMouseOver="this.style.background=\'highlight\';this.style.color=\'highlighttext\';" onMouseOut="this.style.background=\'threedface\';this.style.color=\'menutext\';" onClick="parent.window.location.href=\'' + menuItems[m][1] + '\'"><td style="background:threedface" width="1" nowrap></td><td width="21" nowrap></td><td nowrap>' + menuItems[m][0] + '</td><td width="21" nowrap></td><td style="background:threedface" width="1" nowrap></td></tr>'; else menuContent += '<tr><td colspan="5" height="4"></td></tr><tr><td colspan="5"><table cellspacing="0"><tr><td width="2" height="1"></td><td width="0" height="1" style="background:threedshadow"></td><td width="2" height="1"></td></tr><tr><td width="2" height="1"></td><td width="100%" height="1" style="background:threedhighlight"></td><td width="2" height="1"></td></tr></table></td></tr><tr><td colspan="5" height="3"></td></tr>'; } menuContent += '</table></td><td style="background:threedshadow"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threedlightshadow"></td><td style="background:threedhighlight"></td><td style="background:threedface"></td><td style="background:threedshadow"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threedlightshadow"></td><td style="background:threedshadow" colspan="3"></td><td style="background:threeddarkshadow"></td></tr><tr height="1"><td style="background:threeddarkshadow" colspan="5"></td></tr></table>'; menuPopup = window.createPopup(); menuPopup.document.body.innerHTML = menuContent; } function showMenu(){ menuXPos = event.clientX + menuOffset; menuYPos = event.clientY + menuOffset; menuXIncrement = menuWidth / menuSpeed; menuYIncrement = menuHeight / menuSpeed; menuTimer = setTimeout("openMenu(0,0)", menuDelay); return false; } function openMenu(height, width){ iHeight = height; iWidth = width; menuPopup.show(menuXPos, menuYPos, iWidth, iHeight, document.body); if(iHeight < menuHeight) menuTimer = setTimeout("openMenu(iHeight + menuYIncrement, iWidth + menuXIncrement)", 1); else clearTimeout(menuTimer); } if(isIe) document.oncontextmenu = showMenu; //--------------------------------------------------------- function printWindow() { bV = parseInt(navigator.appVersion); if (bV >= 4) window.print(); } function homepage(){ document.body.style.behavior='url(#default#homepage)'; document.body.setHomePage('http://www.ultimatebuzz.net/'); } function bookmark() { var imgFav= new Image(); imgFav.src= "http://www.ultimatebuzz.net/favicon.ico"; window.external.AddFavorite('http://www.ultimatebuzz.net', 'Ultimatebuzz.net'); } function emailus() { location.href="mailto:info@ultimatebuzz.net?Subject=Website Submission"; } function info() { alert('Ultimatebuzz.net - 2001-2003 © All Rights Reserved'); } </script> cái này bạn chèn trong <body>....</body> nha ! Còn cái chú thich kia thì mình chịu , không làm được :( mình cũng mới tạp làm web thôi ,chưa có thâm niên nên cũng không góp ý được nhiều :) biết gì có ai hỏi thì trả lời thôi ghế thăm web của mình nè www.ehehe.uni.cc cái uni.cc đăng kí sau khi thấy web của bạn đó
bạn học làm web thì xai dream weaver đi ! làm vừa dễ lại đẹp ! còn cái chú thích mà bạn nói hình như dream cũng hỗ trợ đó ... sorry vì cũng mới chập chững vào nghề
DM hay Notepad gì cũng thế cả , DM chỉ hỗ trợ bạn trong việc thiết kế thôi , một số chức năng kéo thả .... chứ còn muốn làm 1 số công việc như bạn kia yêu cầu hoặc check các lỗi trong 1 form thì nó ko thể làm đc mà bạn phải tự code .