• Floating EmailThisLink Script


    Author:     etLux
    Directions: Insert the entire block of code below just before
                the page </body> tag.  See the instructions in
                the script for additional setup information.
    =============================================================


    <!-- Begin FloatMail Code //-->

    <script>
    /* Floating Mail-This-Link Script C.2004 by CodeLifter.com */

    // Insert the entire script just before the </body> tag.
    // Set the following two position parameters
    // Negative numbers are relative to right (hX) or bottom (vY)
    // Positive numbers are relative to left (hX) or (vY) top
    // Experiment with values to get positioning exact, and allow
    // for the dimensions of the image & form in the positioning

    var hX = 340;
    var vY = -140;

    </script>

    <!-- Edit the HTML between the div tags to suit your design //-->

    <div id="FloatMail" style="position: absolute;
                               background-color: #000000;
                               background-image:url('float_dots.gif');
                               180px;
                               border- 2;
                               border-style:outset;
                               border-color:#444444;
                               padding:5px">
    <center>
    <form name="eMailer">
    <font size="2" face="Verdana,Arial" color="#ff0056">
    E-Mail This Link
    <br>
    Enter recipient's e-mail:
    </font>
    <br>
    <input type="text" name="address" size="20"
    style="background-color:#000000;
           color:#05fa9e;
           border-color:#ff0000;
           border-1;
           border-style:dashed;
           margin-top:7px;"><br>
    <input type="button" value="Send this URL" onClick="mailThisUrl();"
    style="color:#ff0057;
           font-family:Arial;
           font-size:10pt;      
           background-color:#000000;
           border-1;
           border-style:solid;
           border-color:#242424;
           margin-top:7px;">
    </form>
    </center>
    </div>


    <!-- End of editable HTML //-->

    <script>
    /* Floating Mail-This-Link Script C.2004 by CodeLifter.com */
    /* Caution! Do not allow linebreaks other than where shown */
    var good;function checkEmailAddress(field){
    var goodEmail=field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
    if (goodEmail){good = true}else{alert('Please enter a valid e-mail address.');
    field.focus();field.select();good=false;}}
    u=window.location;m="I thought this might interest you...";
    function mailThisUrl(){good=false;
    checkEmailAddress(document.eMailer.address);
    if (good){window.location="mailto:"+document.eMailer.address.value+"?subject="+m+"&body="+document.title+" "+u;}}
    var nn=(navigator.appName.indexOf("Netscape")!=-1);
    var dD=document,dH=dD.html,dB=dD.body,px=dD.layers?'':'px';
    function floatMail(iX,iY,id){
    var L=dD.getElementById?dD.getElementById(id):dD.all?dD.all[id]:dD.layers[id];  
    this[id+'O']=L;if(dD.layers)L.style=L;L.nX=L.iX=iX;L.nY=L.iY=iY;
    L.P=function(x,y){this.style.left=x+px;this.style.top=y+px;};L.Fm=function(){var pX, pY; 
    pX=(this.iX >=0)?0:nn?innerWidth:nn&&dH.clientWidth?dH.clientWidth:dB.clientWidth; 
    pY=nn?pageYOffset:nn&&dH.scrollTop?dH.scrollTop:dB.scrollTop; 
    if(this.iY<0)pY+=nn?innerHeight:nn&&dH.clientHeight?dH.clientHeight:dB.clientHeight; 
    this.nX+=.1*(pX+this.iX-this.nX);this.nY+=.1*(pY+this.iY-this.nY);this.P(this.nX,this.nY);
    setTimeout(this.id+'O.Fm()',33);};
    return L;}
    floatMail(hX,vY,'FloatMail').Fm();
    </script>

    <!-- End FloatMail Code //-->


    ============================================================

  • 相关阅读:
    Eclipse的SVN插件与本地SVN客户端关联不上
    Oracle与MySQL连接配置
    树莓派实践项目
    20135333苏正生——信息安全系统设计基础第十四周学习总结
    《图解tcp/ip》读书笔记(二)
    解决VC几个编译问题的方法——好用
    《深入理解计算机系统》深入实践之——vim深入研究
    20135333苏正生——信息安全系统设计基础第十二周学习总结
    《图解tcp/ip》读书笔记(一)
    《你的灯亮着吗?:发现问题的真正所在》读书笔记2
  • 原文地址:https://www.cnblogs.com/cy163/p/194718.html
Copyright © 2020-2023  润新知