日期:2014-05-19  浏览次数:20491 次

关于获取MAC地址问题和右键菜单扩展问题
1.记得曾听人说现在流行用MAC地址来标识一台机器,而不用IP了,因为IP不固定。那么请问除了ActiveX控件外(因为会弹出提示,甚至拒绝执行),还有其它办法获取网页客户端的MAC地址吗?

2.怎样扩展IE右键菜单,使其可以像菜单中的“编码”一样能够有级联菜单?

另外问一下,像Google,baidu,3721等制作的IE工具条通常是用什么语言开发的?用什么语言开发最简单?(我学C++学了一年,工作开始就转向C#,C#3年左右了,C++基本忘差不多了)

------解决方案--------------------
好像网上有C#获取Mac地址的源码..然后再用Ajax就可以轻松实现

http://www.lbsxp.com
------解决方案--------------------
MAC也不是固定的,在2000/XP/2003等NT架构的Windows上面更改MAC并不比更改IP复杂。而获取MAC比获取IP要复杂得多,所以不建议你用MAC来做这样的事情。

IE插件有很多种类型,工具栏是一种,扩展菜单又是一种,接口实现上都靠C++。
------解决方案--------------------
第一个 没啥戏
第二个 C++,Delphi等也可以实现
------解决方案--------------------
1、MAC地址只能用ActiveX控件,这个是肯定的,因为ASP.NET不能有权利去读取客户机的MAC,只能用ActiveX,这个插件我有,需要的话联系我。至于大家说的可改,我认为不是那么回事,因为你的数据库中维护着一个MAC地址表,客户机改不改MAC与你无关,你检查这个MAC在我的表中那OK,否则不让用,他改了只能用不了,不会有其它后果。

2、 <HTML xmlns:v> <HEAD>

<head>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<title> 网页特效代码|JsCode.CN|---Js+DVML:很酷实用的右键弹出菜单 </title>
<STYLE>
v\:*{behavior:url(#default#VML);}
.menulist{position:static;PADDING-TOP:6;LETTER-SPACING:8;HEIGHT:20;TEXT-ALIGN:center;margin-bottom:-2}
</STYLE>
</head>

<BODY oncontextmenu= 'return false '>

<Script>
//作者:风云舞
var menutime1=null,showobjs1=null //menutime1=循环计时器调用变量,showobjs1=绑定菜单,定时器过程执行时调用
function document.onmouseup(){if(event.button==2)menushow(menu2,60,10)}
function menushow(showobjs,showwid,showsudu){ //右键菜单展开函数
//函数说明:menushow(菜单id,项平均宽度,伸展速度)
if(menutime1!=null){clearInterval(menutime1);menutime1=null}
showobjs.style.left=event.x;showobjs.style.top=event.y;
showobjs1=showobjs.all.tags( "roundrect ");var showlens=showobjs1.length
for(i=0;i <showlens;i++){showobjs1[i].style.width=0;showobjs1[i].style.visibility= "hidden "}
showobjs.style.display= " "
menutime1=setInterval( "for(i=0;i < "+showlens+ ";i++){showobjs1[i].style.visibility= ' ';if(showobjs1[i].offsetWidth < "+showwid+ "){showobjs1[i].style.width=showobjs1[i].offsetWidth+ "+showsudu+ ";break;}else{if(i== "+(showlens-1)+ "){clearInterval(menutime1);menutime1=null}}} ",20)
}
function menuclose(showobjs2,showsudu2){ //右键菜单关闭函数
//函数说明:menushow(菜单id,关闭压缩速度)
if(menutime1!=null)return false
showobjs1=showobjs2.all.tags( "roundrect ");var showlens=showobjs1.length-1
menutime1=setInterval( "for(i= "+showlens+ ";i> -1;i--){if(showobjs1[i].offsetWidth> 0){try{showobjs1[i].style.width=showobjs1[i].offsetWidth- "+showsudu2+ ";break;}catch(e){showobjs1[i].style.visibility= 'hidden ';if(i==0){clearInterval(menutime1);menutime1=null}}}} ",20)
}
</script>

<span id=menu2 style= "position:absolute;Z-INDEX:40000;LEFT:395;TOP:210;color:#739EFE;cursor:hand;display:none;font-size:12px;font-family:宋体 " onmouseover= "if(event.srcElement.tagName== 'roundrect '){event.srcElement.strokecolor= 'blue ';event.srcElement.style.color= 'blue ';event.srcElement.style.marginLeft=10} " onmouseout= "if(event.srcElement.tagName== 'roundrect '){event.srcElement.strokecolor= '#739EFE ';event.srcElement.style.color= '#739EFE ';event.srcElement.style.marginLeft=0} ">
<v:roundrect class=menulist arcsize=0.5 strokecolor=#739EFE>
<v:fill type=gradient opacity=.4 color=#739EFE color2=white angle= "50 "/> <a targe