Javascript word count statistics, distinguishing between English and Chinese _ javascript skills

Source: Internet
Author: User
The word count statistics result Code implemented by hta. Two are counted in Chinese and one is counted in English.

<Hta: application windowstate = maximize singleInStance = 1 applicationName = text> <STYLE> TEXTAREA {border-color = F00; background = TransParent; font = 600 15/1. 3; color = blue; height = 100%; overflow-Y = hidden} # t {behavior = url (# default # time2 )} </STYLE> <body style = margin = 5 scroll = no> <Q id = e style = position = absolute; top = 49%; left = 45%; background = ccc; width = 69; z-index =-9; color = blue> <Q id = E begin = 0; E. end dur = 5 ms onmouseov Er = 'E. style. backgroundColor = 000; style. color = "yellow" 'onmouseout = 'E. style. backgroundColor = "CCC"; style. color = "00f"; 'style = 'behavior = url (# default # time2); color = 00f; font = 600 16; padding = 2; width = 1; letter-spacing = 3; filter = glow (color = RED, strength = 3) 'onbegin = document. title = innerText = Date (). slice (-13,-5)> </Q> <q id = info> </q> </Q> <textarea id = T dir = rtl readOnly style = border-right = 0; width = 38; height = 100%> </te Xtarea> <textarea id = t onpropertyChange = "Len = value. replace (/(\ r \ n) $/gm ,''). split (''), len = len0 = Len. length; for (o in Len) if (Len [o]. charCodeAt (0)> 256) len ++; info. innerText = len0 + 'character \ n' + len + 'byte' "style = 'text-decoration = underline0; border-left = 0' onbegin =" style. width = document. body. offsetWidth-60; AR = [], AR. length = 999; for (I = 0; I </textarea> script function SaveAs5 (imgURL) {oPop = window. open (imgURL, 0, "width = 1, le Ft = 3000 "); for(your opop.doc ument. readyState! = "Complete";) ififopop.doc ument. readyState = "complete") break;} oPop.document.exe cCommand ("SaveAs"); oPop. close ();} script <input value = 'text. hta 'size = 9 onclick = "SaveAs5 (value)" accesskey = X>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]

Related Article

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.