Список вопросов по HTML

       

Чтобы комментарий (параметр title) показывался в NN4?


Это можно сделать только для ссылок и для некоторых элементов формы. Если в NN4 нужно показывать комментарий для других элементов HTML, нужно поместить их в «пустую» ссылку, как описано в п. 5.1.

Вставляем в <head> скрипт:

<script language="JavaScript" type="text/javascript"><!-- var tipId=0; var tipOffId=0;

function showTip(tipTxt,x,y) { if (document.layers) {     if (!document.layers.tip) {       document.layers.tip=new Layer(window.innerWidth)     }     document.layers.tip.left=x-5;     document.layers.tip.top=y+15;     document.layers.tip.document.open();     document.layers.tip.document.write('<table border="0" '+     'cellspacing="0" cellpadding="1"><tr><td bgcolor="#000000">'+     '<table border="0" cellspacing="0" cellpadding="1"><tr><td '+     'style="background:#FFFFCC;font-family:sans-serif;"><small '+     'style="font-size:8pt;">'+unescape(tipTxt)+'</small></td></tr>'+     '</table></td></tr></table>');     document.layers.tip.document.close();     document.layers.tip.visibility='show'     tipOffId=setTimeout('tipOff();',6000)   } }

function tipOn(tipTxt,eventObj) {   if (document.layers) {     tipId=setTimeout('showTip(\''+escape(tipTxt)+'\','+       eventObj.x+','+eventObj.y+');',500);   } }

function tipOff() {   if (document.layers) {     clearTimeout(tipId);     clearTimeout(tipOffId);     if (document.layers.tip) {       document.layers.tip.visibility='hide'     }   } } //--></script>

...

<a href="page.html" title="Комментарий" onmouseover="tipOn('Комментарий',event);" onmouseout="tipOff();">



Содержание раздела