ライン:31 文字:3 エラー:'ID.style'はNullまたはオブジェクトではありません。でした。
// ヘルプの非表示
function hidePop() {
ID.style.visibility = "hidden";
}↑の部分の「ID.style.visibility = "hidden";」になるようです。<html>
<head>
<title>ようこそ!</title>
<SCRIPT language="JavaScript">
<!--
// ポップアップヘルプ
txt = new Array();
txt[1] = '●●';
txt[2] = '○○';
txt[3] = '△△';
txt[4] = '■■';
// ヘルプの表示
function popUp(i) {
ID.innerHTML = txt[i];
// ヘルプの位置を調整
ID.style.left = event.clientX + 10 + 'px'; // 表示するx座標(適度に調整してください)
ID.style.top = event.clientY - 5 + 'px'; // 表示するy座標(適度に調整してください)
ID.style.visibility = "visible";
}
// ヘルプの非表示
function hidePop() {
ID.style.visibility = "hidden";
}
var ID;
onload = function() { ID = document.getElementById('ID'); }
//-->
</SCRIPT>
</HEAD>
<BODY>
<SPAN id="ID" STYLE="visibility: hidden; position: absolute;"></SPAN>
<TABLE><TR><TD colspan="2" onmouseover="hidePop()">〜〜</TD></TR>
<TR><TD>
<a href="top.htm" onMouseOver="popUp(1)"><img src="./image/top.gif" border="0"></A><BR>
<a href="top.htm" onMouseOver="popUp(2)"><img src="./image/top.gif" border="0"></A><BR>
<a href="top.htm" onMouseOver="popUp(3)"><img src="./image/top.gif" border="0"></A><BR>
<a href="top.htm" onMouseOver="popUp(4)"><img src="./image/top.gif" border="0"></A><BR>
</TD><TD onmouseover="hidePop()">〜〜</TD></TR>
<TR><TD colspan="2" onmouseover="hidePop()">〜〜</TD></TR></TABLE>
</BODY></HTML>function popUp (i, event) {
if (! event) event = window.event;
// 以下同じ。なお、event.clientX/Y は、Opera はツールバー・サイドバー領域まで含めた値を
// 返し、Safari はスクロール量まで含めた値を返すことに注意。要するに、かなりズレる。onmouseover="popUp(1, event)"
onload = function () {
ID = document.createElement ('span');
ID.style.visibility = 'hidden';
ID.style.position = 'absolute';
document.body.insertBefore (ID, document.body.firstChild);
};