目前在做公司的OA,现在有这么一个模块:
网址收藏。就是可以实现对超链接直接右击鼠标,鼠标内有这么一个选项:收藏到OA然后就可以直接收藏到oa里自己的网址收藏里面。这个该怎么实现?使用java能做么?求大神。java

解决方案 »

  1.   

    你这是想干嘛?用java远程操作程序?不过如果你知道是什么浏览器的话,或许可以远程写入到该浏览器的收藏夹内。或者用js去调吧。不过一般这个都属于浏览器自己的功能。直接用网页的话,会复杂
      

  2.   

    <HTML>
    <HEAD>
    </HEAD>
    <BODY oncontextmenu="return false">
    <SCRIPT>
    var menutime1=null,showobjs1=null 
    function document.onmouseup(){if(event.button==2)menushow(menu2,60,20);else if(event.button==1&&event.srcElement.tagName!="roundrect"){clearInterval(menutime1);menutime1=null;menuclose(menu2,30)}}
    function menushow(showobjs,showwid,showsudu){
    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){
    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 onmouseover="if(event.srcElement.tagName=='roundrect'){event.srcElement.strokecolor='blue';event.srcElement.style.color='blue';event.srcElement.style.marginLeft=10}" style="DISPLAY: none; FONT-SIZE: 12px; Z-INDEX: 40000; LEFT: 395px; CURSOR: hand; COLOR: #739efe;FONT-FAMILY: 宋体; POSITION: absolute; TOP: 210px" 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 = ".5" coordsize = "21600,21600" fillcolor = "#739efe" strokecolor = "#739efe"><v:fill type = "gradient" opacity = "26214f" color2 ="white" angle = "50"></v:fill><a href="http://www.zzjs.net">aaa</a></v:roundrect><BR>
    <v:roundrect class=menulist arcsize = ".5" coordsize = "21600,21600" fillcolor = "#739efe" strokecolor ="#739efe">
    <v:fill type = "gradient" opacity = "26214f" color2 = "white" angle ="50"></v:fill><a href="<#ZC_BLOG_HOST#>cat=1">bb</a></v:roundrect><BR><v:roundrect class=menulist arcsize = ".5" coordsize = "21600,21600" fillcolor = "#739efe" strokecolor = "#739efe">
    <v:fill type = "gradient" opacity = "26214f" color2 = "white" angle = "50"></v:fill>ddd</v:roundrect><BR>
    <v:roundrect onmouseup=menuclose(menu2,30) class=menulist arcsize = ".5" coordsize = "21600,21600" fillcolor = "#739efe"
    strokecolor = "#739efe"><v:fill type = "gradient" opacity = "26214f" color2 ="white" angle = "50"></v:fill>ddd</v:roundrect> </SPAN>
    </BODY>
    </HTML>搜的例子,看看
      

  3.   

    这个应该不是用java, 而是用JavaScript把