updated_at: 2024-12-14 13:12

풍선도움말

js

function msgposit() {
  message.style.posLeft = event.x + 40 + document.body.scrollLeft;
  message.style.posTop = event.y - 40 + document.body.scrollTop;
}
function msgset(str,str2) {
  var text;
  text =' <div>'
  text += ' <p> <b>' + str + '  </b><br> <br>' + str2 + ' </div>';
  message.innerHTML = text;
}
function msghide() {
  message.innerHTML = '';
}

function on_enterkey(){
  if(event.keyCode==13) onSearch();
}

css

#message {
  position:absolute; 
  left:78px; 
  top:165px; 
  width:200px; 
  height:62px; 
  z-index:1; 
  border-width:1px; 
  border-style:none;
}

html

<div id='message'></div>

<a href="#" onmousemove="msgposit();" onmouseout="msghide(); window.status=(''); return true;" onmouseover="msgset('제목','내용'); return true;"> 
제목
 </a>

CodePen

See the Pen javascript 풍선도움말 by younghyeong ryu (@wangta69) on CodePen.

Table of contents 목차

평점을 남겨주세요
평점 : 2.5
총 투표수 : 1

질문 및 답글