가상커서 이동을 위한 스크립트 수정

This commit is contained in:
chicpro
2013-03-12 13:49:12 +09:00
parent 32a638d68f
commit d282e3639a
2 changed files with 9 additions and 11 deletions

View File

@ -324,16 +324,16 @@ function wrestSubmit()
if (wrestFld.style.display != "none") {
var id = wrestFld.getAttribute("id");
var msg_el = document.getElementById(id+"_msg");
var new_href;
var curr_href = document.location.href.replace(/#.+$/, "");
if(msg_el != null) {
msg_el.innerText = wrestMsg;
new_href = curr_href+"#"+id+"_msg";
} else {
new_href = curr_href+"#"+id;
}
// 오류메세지를 위한 element 추가
var msg_el = document.createElement("strong");
msg_el.id = "msg_"+id;
msg_el.className = "msg_sound_only";
msg_el.innerHTML = wrestMsg;
wrestFld.parentNode.insertBefore(msg_el, wrestFld);
var new_href = document.location.href.replace(/#.+$/, "")+"#msg_"+id;
document.location.href = new_href;
//wrestFld.style.backgroundColor = wrestFldBackColor;