Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一张包含许多城市的国家地图。我用图像地图发现了每个城市。我想在点击地点时显示与每个城市相关的数据库数据。是否有任何可能的方法通过图像映射传递变量(id?)以使用此变量显示数据?
非常感谢!
href您可以在元素的属性中使用 URL 的查询部分area(我假设您正在使用所谓的客户端图像映射,使用map包含元素的area元素)。例子:
href
area
map
<area shape="circle" coords="100,200,5" alt="London" href= "/foo.php?thing=42&stuff=something&country=GB">