#1
right click 連結 ... - 蛙 (Administrator) 發表於 27-7-2013 09:25
使用滑鼠指著網頁 right click ,即會顯示連結選單
<div class="menuitems" url="連結網址">連結名稱</div> 選單可隨意增加或減少,但要留意選框寬及高度要更改
<style>
<!--
#ie5menu{
position:absolute;
width:50pt;
border:1pt solid black;/*外框粗細色彩*/
background-color:menu;/*背景顏色*/
font-family:Verdana;
line-height:15pt;
cursor:default;
visibility:hidden;
}
.menuitems{
padding-left:5pt;/*修改連結文字離選單左邊的距離*/
padding-right:5pt;/*修改連結文字離選單右邊的距離*/
}
-->
</style>
<script language="JavaScript">
<!--
var display_url=0
function showmenuie5(){
ie5menu.style.left=document.body.scrollLeft+event.clientX
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==1)
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"
window.location=event.srcElement.url
}
-->
</script>
<!--在 style="width: 80pt; height: 80pt" 中修改選單的寬度及高度-->
<div id="ie5menu" onMouseOver="highlightie5()" onMouseOut="lowlightie5()" onClick="jumptoie5()" style="width: 80pt; height: 80pt">
<div class="menuitems" url="http://bunbun000.com/">笨笨網站</div>
<div class="menuitems" url="http://bunbunhk.com/">笨網論壇</div>
<div class="menuitems" url="連結網址">連結名稱</div>
<div class="menuitems" url="連結網址">連結名稱</div>
<script language="JavaScript">
<!--
document.oncontextmenu=showmenuie5
if (document.all&&window.print)
document.body.onclick=hidemenuie5
-->
</script>
</div>
#2
複製上列語法 - 蛙 (Administrator) 發表於 27-7-2013 09:57
<form name="copy">
<textarea cols="40" name="txt" rows="4" style="BACKGROUND-COLOR:#ffffff; COLOR:#000000; FONT-SIZE:9pt">
<style>
<!--
#ie5menu{
position:absolute;
width:50pt;
border:1pt solid black;/*外框粗細色彩*/
background-color:menu;/*背景顏色*/
font-family:Verdana;
line-height:15pt;
cursor:default;
visibility:hidden;
}
.menuitems{
padding-left:5pt;/*修改連結文字離選單左邊的距離*/
padding-right:5pt;/*修改連結文字離選單右邊的距離*/
}
-->
</style>
<script language="JavaScript">
<!--
var display_url=0
function showmenuie5(){
ie5menu.style.left=document.body.scrollLeft+event.clientX
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==1)
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"
window.location=event.srcElement.url
}
-->
</script>
<!--在 style="width: 80pt; height: 80pt" 中修改選單的寬度及高度-->
<div id="ie5menu" onMouseOver="highlightie5()" onMouseOut="lowlightie5()" onClick="jumptoie5()" style="width: 80pt; height: 80pt">
<div class="menuitems" url="http://bunbun000.com/">笨笨網站</div>
<div class="menuitems" url="http://bunbunhk.com/">笨網論壇</div>
<div class="menuitems" url="連結網址">連結名稱</div>
<div class="menuitems" url="連結網址">連結名稱</div>
<script language="JavaScript">
<!--
document.oncontextmenu=showmenuie5
if (document.all&&window.print)
document.body.onclick=hidemenuie5
-->
</script>
</div>
</textarea><br>
<input onclick="javascript:this.form.txt.focus();this.form.txt.select();" type="button" value="全選">
</form>
<br>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4078143172638881";
/* 336X280 */
google_ad_slot = "3268225205";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>