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

HTML右键菜单

2020-02-16 18:32 316 查看


<!DOCTYPE html>

<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>超实用jQuery右键菜单DEMO演示</title>


<link rel="stylesheet" type="text/css" href="bootstrap-3.3.6/css/bootstrap.min.css" />
<style type="text/css">
body, html { font-size: 100%; padding: 0; margin: 0;}
</style>
</head>
<body>
<div style="text-align:center;clear:both">
<script src="/gg_bd_ad_720x90.js" type="text/javascript"></script>
<script src="/follow.js" type="text/javascript"></script>
</div>
<div class="container" style="margin-top:20px;">
<div class="panel panel-primary">
  <div class="panel-heading">jQuery Contextify Demo</div>
  <div class="panel-body">
使用右键点击这里
  </div>
</div>
</div>


<script src="js/jquery-2.1.1.min.js" type="text/javascript"></script>
<script src="src/jquery.contextify.js"></script>
<script>
var options = {items:[
  {header: '右键功能菜单'},
   {divider: true},
  {text: '第一个链接', href: '#'},
 
  {text: '第二个链接', onclick: function() {alert("你点击了第二个链接")}},
  {text: '第三个链接', onclick: function() {alert("你点击了第3个链接")}},
  {text: '第四个链接', onclick: function() {alert("你点击了第4个链接")}},
  {divider: true},
  {text: '更多...', href: '#'}
]}
$('.panel-body').contextify(options);
</script>




</body>
</html>
  • 点赞
  • 收藏
  • 分享
  • 文章举报
Sunledog 发布了0 篇原创文章 · 获赞 1 · 访问量 3030 私信 关注
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: