اگه ممکنه کد راست کلیک رو برای من بذارید.
( ادیت کردن منوی باز شده پس از کلیک راست )
که بتونم گزینه ها و رنگ زمینه شو خودم مشخص کنم.
ممنون:11::5:
Printable View
اگه ممکنه کد راست کلیک رو برای من بذارید.
( ادیت کردن منوی باز شده پس از کلیک راست )
که بتونم گزینه ها و رنگ زمینه شو خودم مشخص کنم.
ممنون:11::5:
سلام
من همچین کدی ندیدم
ولی نرم افزار دیدم که طراحیش میکنه
sothink DHTML menu
<SCRIPT language="javascript">
document.onmousedown=click
function click() {
if ((event.button==2) || (event.button==3))
{
alert("کپي برداري از مطالب بدون اجازه ممنوع است ");
} }
</SCRIPT>
موید باشید:5:
ظاهرا با IE کار میکنه :
[php]<!-- TWO STEPS TO INSTALL RIGHT CLICK MENU:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<style>
<!--
.skin0 {
position:absolute;
text-align:left;
width:200px;
border:2px solid black;
background-color:menu;
font-family:Verdana;
line-height:20px;
cursor:default;
visibility:hidden;
}
.skin1 {
cursor:default;
font:menutext;
position:absolute;
text-align:left;
font-family: Arial, Helvetica, sans-serif;
font-size: 10pt;
width:120px;
background-color:menu;
border:1 solid buttonface;
visibility:hidden;
border:2 outset buttonhighlight;
}
.menuitems {
padding-left:15px;
padding-right:10px;
}
-->
</style>
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Web Site: http://www.dynamicdrive.com -->
<! >
<! >
<!-- Begin
var menuskin = "skin1"; // skin0, or skin1
var display_url = 0; // Show URLs in status bar?
function showmenuie5() {
var rightedge = document.body.clientWidth-event.clientX;
var bottomedge = document.body.clientHeight-event.clientY;
if (rightedge < ie5menu.offsetWidth)
ie5menu.style.left = document.body.scrollLeft + event.clientX - ie5menu.offsetWidth;
else
ie5menu.style.left = document.body.scrollLeft + event.clientX;
if (bottomedge < ie5menu.offsetHeight)
ie5menu.style.top = document.body.scrollTop + event.clientY - ie5menu.offsetHeight;
else
ie5menu.style.top = document.body.scrollTop + event.clientY;
ie5menu.style.visibility = "visible";
return false;
}
function hidemenuie5() {
ie5menu.style.visibility = "hidden";
}
function highlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "highlight";
event.srcElement.style.color = "white";
if (display_url)
window.status = event.srcElement.url;
}
}
function lowlightie5() {
if (event.srcElement.className == "menuitems") {
event.srcElement.style.backgroundColor = "";
event.srcElement.style.color = "black";
window.status = "";
}
}
function jumptoie5() {
if (event.srcElement.className == "menuitems") {
if (event.srcElement.getAttribute("target") != null)
window.open(event.srcElement.url, event.srcElement.getAttribute("target"));
else
window.location = event.srcElement.url;
}
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<div id="ie5menu" class="skin0" onMouseover="highlightie5()" onMouseout="lowlightie5()" onClick="jumptoie5();">
<div class="menuitems" url="javascript:history.back();">Go Back</div>
<div class="menuitems" url="http://javascript.internet.com">Go Home</div>
<hr>
<div class="menuitems" url="http://forum.javascriptsource.com">JS Forum</div>
<div class="menuitems" url="http://faq.javascriptsource.com">Site FAQs</div>
<hr>
<div class="menuitems" url="http://javascript.internet.com/link-us.html">Link to Us</div>
<div class="menuitems" url="http://javascript.internet.com/feedback.html">Contact Us</div>
</div>
<script language="JavaScript1.2">
if (document.all && window.print) {
ie5menu.className = menuskin;
document.oncontextmenu = showmenuie5;
document.body.onclick = hidemenuie5;
}
</script>
<!-- Script Size: 3.36 KB -->[/php]
سلام.
خوشکل کاری یاش به عهده ی خودت.
FF && IE
[HTML]<html>
<head>
<script type="text/javascript">
document.onmousedown = click;
function click(eve) {
if (!eve) eve = window.event;
if ((eve.button==2) || (eve.button==3)) {
document.getElementById("ctxMenu").style.display = "block";
}
}
</script>
</head>
<body oncontextmenu="click(event);return false;">
<div id="ctxMenu" style="display:none;">
<a href="http:///">Good kar mikoneh!!!</a>
</div>
</body>
</html>[/HTML]
ممنون
منم یه چیز بلد شدم