Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
html中的光标指针<;面积>;标签_Html_Css - Fatal编程技术网

html中的光标指针<;面积>;标签

html中的光标指针<;面积>;标签,html,css,Html,Css,我有一个像这样的jsp <%@ include file="commonheader.jsp"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <script

我有一个像这样的jsp

<%@ include file="commonheader.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script type="text/javascript">
function passValue(stateid,cityid)
{
if(cityid=="0")
{
    document.forms["test"].action="locator/city.jsp"
    document.forms["test"]["stateid"].value=stateid;
    document.forms["test"].submit();
}
else
{   
    document.forms["test"].action="locator/area.jsp"
    document.forms["test"]["stateid"].value=stateid;
    document.forms["test"]["cityid"].value=cityid;
    document.forms["test"].submit();
}
}
</script>
</head>

<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<div align="center">     
<table width="70%" border="0">
<tr>
<td width="80%" align="center"><img src="images/map.jpg" width="550" height="500" border="0" usemap="#Map">
<form id="test" name="test" method="post">
<input type="hidden" name="stateid" />
<input type="hidden" name="cityid"/>       
<map name="Map">
<area shape="rect" coords="81,291,180,305" alt="Maharashtra" onclick="passValue('15','0') />
</map>
</form>
</td>
</tr>
</table>
</div>
</body>
</html>

函数passValue(stateid,cityid)
{
如果(cityid==“0”)
{
document.forms[“test”].action=“locator/city.jsp”
document.forms[“test”][“stateid”]。value=stateid;
文件。表格[“测试”]。提交();
}
其他的
{   
document.forms[“test”].action=“locator/area.jsp”
document.forms[“test”][“stateid”]。value=stateid;
文件。表格[“测试”][“城市ID”]。值=城市ID;
文件。表格[“测试”]。提交();
}
}

我不相信你做错了什么。如果您正在寻找快速解决方案,只需将
MAP
IMG
包装在
DIV
标记中,并设置以下样式:

如果您需要更详细的解决方案,本主题可能会有所帮助:

地图上的HTML5规范
供参考:


我找不到任何明确说明这些元素不能被样式化的东西,但这似乎是我所做研究的普遍共识

href=“javascript:void(null);”
添加到区域标记中就可以了。

谢谢!但我试过类似的方法,现在效果很好。。。