Js + flash: Special Effects on handwritten Input Functions

Source: Internet
Author: User
Js + flash implement special effects of handwriting Input

This js special effect is a very practical and commonly used function. More and more websites are now joining the handwriting function, mainly for the convenience of text input by netizens who are not too easy to type or are too lazy to type, to facilitate the use of Internet users, the entire search function and handwriting are sorted out and used directly with background programs.

 

It mainly includes the following js function special effects:

1. Search for special effects

2. Pop-up special layer effects

3. Special handwriting Effects

4. move the cursor to the text box to select all results

 

The main handwriting Function Code is as follows:

function open_lw(c) {    var g = "showflash";    var a = document.getElementById("showButton");    var b = getCoords(a);    if (!document.getElementById(g)) {        var f = document.createElement("div");        var e = b.y + 26;        var d = b.x;        f.style.left = d + "px";        f.style.top = e + "px";        f.style.margin = "0px";        f.style.padding = "0px";        f.style.position = "absolute";        f.style.zIndex = "9999";        f.id = g;        f.innerHTML = c;        f.style.background = "#fff";        document.body.appendChild(f)    } else {        iciba_shouxie_close()    }}function getCoords(c) {    var a = c.offsetLeft - 30;    var d = c.offsetTop;    var b = c.offsetParent;    while (b != null) {        a += b.offsetLeft;        d += b.offsetTop;        b = b.offsetParent    }    return {        x: a,        y: d    }}function iciba_shouxie_close() {    var a = "showflash";    if (document.getElementById(a)) {        document.body.removeChild(document.getElementById(a))    }}

 

The running effect is as follows:

 

Online Demo

This js special effect is a very practical and commonly used function. More and more websites are now joining the handwriting function, mainly for the convenience of text input by netizens who are not too easy to type or are too lazy to type, to facilitate the use of Internet users, the entire search function and handwriting are sorted out and used directly with background programs.

 

It mainly includes the following js function special effects:

1. Search for special effects

2. Pop-up special layer effects

3. Special handwriting Effects

4. move the cursor to the text box to select all results

 

The main handwriting Function Code is as follows:

function open_lw(c) {    var g = "showflash";    var a = document.getElementById("showButton");    var b = getCoords(a);    if (!document.getElementById(g)) {        var f = document.createElement("div");        var e = b.y + 26;        var d = b.x;        f.style.left = d + "px";        f.style.top = e + "px";        f.style.margin = "0px";        f.style.padding = "0px";        f.style.position = "absolute";        f.style.zIndex = "9999";        f.id = g;        f.innerHTML = c;        f.style.background = "#fff";        document.body.appendChild(f)    } else {        iciba_shouxie_close()    }}function getCoords(c) {    var a = c.offsetLeft - 30;    var d = c.offsetTop;    var b = c.offsetParent;    while (b != null) {        a += b.offsetLeft;        d += b.offsetTop;        b = b.offsetParent    }    return {        x: a,        y: d    }}function iciba_shouxie_close() {    var a = "showflash";    if (document.getElementById(a)) {        document.body.removeChild(document.getElementById(a))    }}

 

The running effect is as follows:

 

Online Demo

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.