这是我的代码,当我将鼠标悬停在图像上时,警告就会出现;JavaScript onmouseover警报
var special_offers = document.getElementsByClassName("special_offer");
//for each special offer
for(i=0;i<special_offers.length;i++){
var special_offer = special_offers[i];
special_offer.setAttribute("offer_shown", "0");
special_offer.onmouseover = function(){
if(this.getAttribute("offer_shown") == "0"){
this.setAttribute("offer_shown", "1");
alert('This room has the special offer attached to it, please book soon before you miss out!');
}
}
我想找出我如何从沼泽标准JS警报更改为一个盒子,我可以的风格,我想我会使用某种一个div的。
任何帮助,非常感谢。
搜索模态窗口。 jQuery UI有一些你可以使用的。或者你可以用绝对定位的div制作你自己的。 – Paulpro 2013-04-22 00:43:39
对不起忘了添加我试图不使用jQuery – 2013-04-22 00:53:20