惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
博客园_首页
罗磊的独立博客
云风的 BLOG
云风的 BLOG
J
Java Code Geeks
Last Week in AI
Last Week in AI
D
DataBreaches.Net
Jina AI
Jina AI
博客园 - Franky
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
V
V2EX
D
Docker
MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
人人都是产品经理
人人都是产品经理
H
Help Net Security
T
The Blog of Author Tim Ferriss

博客园 - 航宇

关于table中使用了colspan后导致列宽度失效问题 Tomcat9 easyui-datagrid中文分页乱码,提示按钮中文乱码解决方法 修复tomcat9.0中文乱码 maven项目中更新了核心库后导致一些包提示未定义,如:The import org.json cannot be resolved js代码突然在花括号回车自动多加了一个大括号 SQL0419N 十进制除法运算无效,因为结果将有一个负小数位。 SQLSTATE=42911 android listview里包含组件(checkbox)点击事件和Item的点击事件冲突 jsp页面的html代码显示不出来,提示Uncaught SyntaxError: Unexpected token < hibernate中怎样配置两个联合属性为唯一约束(非联合主键) maven 在clean package时,出现:找不到符号 [ERROR] 符号: 方法 sqlDdlFilter(java.lang.String) 解决办法 如何实现Activiti的分支条件的自定义配置(转) 生成验证码 android shape 怎么在底部画横线 ListView点击事件失效(item里面有button按钮控件)解决方法 [IBM][CLI Driver] SQL0270N 函数不受支持(原因码:"75")。 SQLSTATE=42997 ScrollView嵌套Linearlayout显示不全的解决办法 android 可以在程序代码中设置样式:style 基于Zxing的二维码的二维码扫描之横屏扫描 Tomcat Connector的三种运行模式
给area标签添加红色边框
航宇 · 2018-08-01 · via 博客园 - 航宇

<!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>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<title>无标题文档</title>

<script type="text/javascript">

function getOffset(obj){

    var x = obj.offsetLeft, y = obj.offsetTop;

    while(obj.offsetParent){

        obj = obj.offsetParent;

        x += obj.offsetLeft;

        y += obj.offsetTop;

    }

    return {x : x, y : y};

};

function showBorder(obj){

    var img = document.getElementById("bd");

    var div = document.getElementById("border");

    var offset = getOffset(img);

    var coords = obj.coords.split(",");

    div.style.display = "block";

    div.style.left = offset.x + parseInt(coords[0]) + "px";

    div.style.top = offset.y + parseInt(coords[1]) + "px";

    div.style.width = parseInt(coords[2]) - parseInt(coords[0]) + "px";

    div.style.height = parseInt(coords[3]) - parseInt(coords[1]) + "px";

}

function hideBorder(){

    document.getElementById("border").style.display = "none";

}

</script>

</head>

<body>

<img src="http://www.baidu.com/img/baidu_logo.gif" width="270" height="129" border="0" usemap="#bdMap" id="bd" />

<map name="bdMap" id="bdMap">

  <area shape="rect" coords="35,22,115,97" onmouseover="showBorder(this);" onmouseout="hideBorder()" />

  <area shape="rect" coords="158,26,238,94" onmouseover="showBorder(this);" onmouseout="hideBorder()" />

</map>

<div id="border" style="display:none; position:absolute;border:2px solid #FF0000; "></div>

</body>

</html>