我想实现类似http://weather.news.sina.com.cn/下的“国内天气”一点某个省就出现一个透明的对话框,我想实现鼠标经过我做的热点时就出现类似透明的对话框,请大家教我,谢谢!
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ShowDialog.aspx.cs" Inherits="ShowDialog" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width: 704px; height: 368px">
            <tr>
                <td style="width: 100px">
                </td>
            </tr>
            <tr>
                <td style="width: 100px">
                    &nbsp;<asp:Image ID="Image1" runat="server" ImageUrl="~/image/55.gif" usemap="#Map"/><map name="ht" id="ht"><area shape="rect" coords="328,191,335,192" href="#" /></map></td>
            </tr>
            <tr>
                <td style="width: 100px">
                </td>
            </tr>
        </table>
        <map name="Map" id="Map"><area shape="circle" coords="230,102,3" onmouseover="showx()"/>
        </map>
    </div>
    </form>
</body>
</html>

解决方案 »

  1.   

    在showx的函数里把一个层的display重赋成block,position:absolute,top,left分别是事件发生的x,y坐标,至于透明可以调一下层的背景
      

  2.   

     ying pan huai le zhuang le ge u pan ban de pe shu ru fa mei le yong pin yin le shuo jian dan dian kan dui ni you bang zhu bu
    jia ge yin cang shu xing de ceng
    <div id="d1" style="zi ji she zhi xian shi fang shi zi ji xuan zhan kong jian huo bu zhan kong jian de zhi she wei yin cang">
    jia zi ji yao xian shi de nei rong 
    </div>
    <script>
    function showx(){
    document.all.d1.style."gang gang she de yin cang zhi de na shu xing"="she wei xian shi";
    }
    </script>
    jian yi zai jia ge onmouseout shi jian shu biao li kai shi zai ba shu xing gai wei yin cang
    ru guo you duo ge zui hao jia yi ge chuan id de can shu
    yong 
    var x=document.all("can shu");
    x.style.shuxing="yincang/xianshi";
      

  3.   

    这个是多余的onmouseover="showx()"
      

  4.   

    那是弹出的一个层,估计是用ajax做的,传入选择省份作参数,然后查出来的