您的位置:首页 > Web前端 > HTML

html 手机点击事件弹出层

2014-04-04 15:18 435 查看
<div style="font-size:14px; color:#000;" ontouchend="gtouchend()">编辑</div>
<div id="editor" style="font-size:14px; position:absolute;z-index: 9999;color:#F99; background-color:#FFFFFF;display:none; top:inherit; right:2%;">
<span ontouchend="updateDetails()" style="right:20%; width:30px; border:1px solid #6FF;">修改</span>                <samp style="width:10px;border:1px solid #6FF;" ontouchend="deleteDetails(this)" >删除</samp>
</div>
<script>
//手释放,如果在500毫秒内就释放,则取消长按事件,此时可以执行onclick应该执行的事件
function gtouchend(){

//这里写要执行的内容(尤如onclick事件)
alert("你这是点击,不是长按"+$("#editor").css("left"));

$("#editor").css("display","block");
return false;
};
</script>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: