A simple traditional conversion code of a page that can be remembered cookies

Source: Internet
Author: User
Tags ming tagname

This method is implemented with JS, support the timely conversion, support cookie memory

Reference method:
<script type= "Text/javascript" src= "Language.js" ></script>

Save the following code as a language.js, you can

document.write ("&lt;a stranlink" "style=" "&gt; Chinese &lt;/a&gt;");


var default_isft = 0//default is traditional, 0-simplified, 1-Traditional


var stranit_delay = 50//Translation delay millisecond (this is designed to let the Web page appear smoothly first)


//-------code Start, do not change the following--


//Convert text


function Strantext (txt,toft,chgtxt)


{


if (txt== "" | | Txt==null) return ""


toft=toft==null? Bodyisft:toft


if (chgtxt) txt=txt.replace (Toft?) Jane ":" (Toft?) Fan ":" Jane ")


if (Toft) {return traditionalized (TXT)}


else {return simplized (TXT)}


}


//Convert object, use recursion, peel to text layers


function Stranbody (fobj)


{


if (typeof (fobj) = = "Object") {var obj=fobj.childnodes}


Else


{


var tmptxt=stranlink_obj.innerhtml.tostring ()


if (Tmptxt.indexof ("Jane") &lt;0)


{


bodyisft=1


Stranlink_obj.innerhtml=strantext (tmptxt,0,1)


Stranlink.title=strantext (stranlink.title,0,1)


}


Else


{


bodyisft=0


Stranlink_obj.innerhtml=strantext (tmptxt,1,1)


Stranlink.title=strantext (stranlink.title,1,1)


}


Setcookie (jf_cn,bodyisft,7)


var obj=document.body.childnodes


}


for (var i=0;i&lt;obj.length;i++)


{


var oo=obj.item (i)


if ("| | br|hr| Textarea| ". IndexOf ("|") +oo.tagname+ "|") &gt;0| | Oo==stranlink_obj) continue;


if (oo.title!= "&amp;&amp;oo.title!=null) Oo.title=strantext (oo.title);


if (oo.alt!= "&amp;&amp;oo.alt!=null) Oo.alt=strantext (Oo.alt);


if (oo.tagname== "INPUT" &amp;&amp;oo.value!= "" &amp;&amp;oo.type!= "text" &amp;&amp;oo.type!= "hidden") oo.value= Strantext (Oo.value);


if (oo.nodetype==3) {Oo.data=strantext (oo.data)}


Else Stranbody (OO)


}


}


function jtpystr ()


{


Return ' ai io Hinder love ao ao dam strike to set up to do trip to tie pound slander to peel full Bao Pao report abalone Jackal prepare exhausted tension pen finish close edge the preparation of the argument braided soft turtle, the bank of the bin-bin, the port-and-pot platinum barge----------------astonished Chan Chan Greedy and the shovel-digging to taste the long compensation bowel factory Chang-chong-chen lining braces to call the correctional Cheng Chi-che, the shame of the teeth blazing bug pet domain 踌 to raise the ugly cupboard kitchen hoe The Virgin storage Touch of the sores to break into the hammer pure words to give Cong chimneys from the bundle of mistakes up to take a loan and a single 郸 Shan mend Christmas bomb when the party is in the block and the island, the guide to steal the Lamp, Deng Enemy, the pad Dian Dian Diao, the top spindle frozen bucket calf Single reading bet the Satin team is a ton of blunt goose, and the bait is the same. Rice visit spinning waste fee dispute Fen Feng Feng wind crazy Feng Feng seam irony Feng Skin radiance and Fu Fu negative obituary the calcium Gaigan drive stalk Jiangxi Gang just steel outline hillock Gao pick Pigeon Pavilion Chrome to the Shing tribute hook Ditch construction buy enough cruel gu Guan Guan Hall habitual wide gauge silicon GUI GUI Friends of the Ark of your executioner roll pot country over the shocking Han Hanyu Crane Wang hung after the pot of Hu Hu home to protect the Shanghai family of the bad Huan Huan ring also slow to change call the 痪 Huan Huan yellow lie wave to destroy bribe dirty will be braised in the sauce, painted meat and dirty guy get goods disaster hit machine hungry, the chicken. How to squeeze several thistles to the memory of the Ji Ji-jia ka k price driving a difficult sealed cocoon detection of alkali and alkaline picking up Jiang reduction of recommendation cheap see Key The ship sword money gradually splash the pulp Jiang Oar prize the sauce glue pouring the arrogant and the twist hinge the richest foot dumpling to be more than the stalk The net correction of the neck by the Jing Jing and the old colt lifting according to the sawing fear of the cuckoo Juan Juan Jie Jie commandments of the tight Jin only to enter Jin, Jing Jue Jue absolutely June June Kai Shell class Ken dug to pull the bank pants Kua Block executioner wide mine open condition deficient kui peek feed-back widen wax Lai Lai Lan bar The basket Lan speak the lazy cable sucks the lo and the the Lei Lei class tear fence to leave the Li Li Lai Li 厉励砾 the Li to be two Lian Lian the sickle pity lian-curtain convergence face chain love refining and food cooling two of the treatment of Liao-lin-Lease age-Linglingling collar-ling-Liu Long deaf throat Cage Ridge Long long Lou Lou Ji Bin Lu Lu Lou Ruthero Lu Lu, she was captured in the water from the LU-an-lo-Al companion repeatedly worry filter Green Luan Twin Luan Lun Lun lun on Luo luo logos gong luo the Mule luo the mother Ma ma yards to scold to buy the MAI to sell Mai to deceive Eels quite full 谩 cat anchor riveting trade Mody? Magnesium door Stuffy The mystery of manganese dream to find the temple of the Children of the Min Ming and the Ming absurd to seek mu sodium na-na difficult to tickle the brain annoyed and tired of kicking stuffed birds Nie nickel lemon hunting ning twist muddy button New pus, Ouchi, and the Pang love to pay spray peng cheat spread the poor apple by the evaluation splashed quite Park Spectrum Umbilical Qi ride not to open the gas to abandon pull the lead to move a hand to sign the Qian Tong Qian Qin cut gun choke wall Qiang strong Rob Spade bridge Chowa Pro Light hydrogen dumping are invited to Qing June in the impoverished area of the body drive caries and zygomatic right advised but Magpie let Rao around hot-thread rong Velvet soft sharp leap run sprinkle SA Gill Tournament Umbrella Funeral and dyeing screen drying and cleaning of the support, and the damage of the fire in Shaoxing credit to the gentleman to examine the sound of kidney infiltration rope Sheng Shi lion wet poetic corpse Recite impressive Su Although the Sui-year-old sun damage the bamboo shoot contraction lock Rex Tart carry the stand the tan tan to talk about sighing soup Hot tao, the body drawer paste Iron Hall hearing hydrocarbon copper head painting regiment decay shed tuo tuo camel-Bend Bay stubborn million network Wei Wei pseudo Wei WeiDanger is Xianxian filling the book of the Xian, the town of the details of the Xiang Xiao pin Xiao selling the Scorpion association with the threat of harmonic writing Xie Xie Zinc Peacemaker hing because they rust embroidery must be Xu Yu continued Xuan, suspension of Tinea Xuan to seek training Xun the duck is dumb and the ducks are mute, the smoke and the salt are strict Yan Yan the 鸯 of the Yang, the yang and the itching are the same, the Yao-Yao and the Yao, the Ballad of the Sun On the yin and the silver drink Sakura Baby Eagle Ching Fluorescent ying yo fu carbuncle Dance Yong Yong Ying-yu-yi with the Yu language to the prison reputation pre-yu shafts Park members of the yuan is far willing to Yue Yue Yue to read cloud Yunyang evenly Christie Halo Yun Yun Miscellaneous disaster load Save temporary praise dirty cut jujube focus on the choice of ze thief gift to the rolling and the trap gate fraud-free debt felt lamp cut rolling stack war Zhang Rose account account expansion Zhao rut GE This zhen needle investigation and diagnosis town to earn open 狰 frame Zheng Card Weaving professional Paper Zhi, the end of the species swelling masses of the day Sudden pig and the sword to be cast to build in the special brick to make a pile Zhuang makeup strong-shaped cone pendant zhun turbidite total longitudinal 邹诅 Group drilling Zhong for only the fierce open plate Gimli remaining chain leakage ';


}


function ftpystr ()


{


return ' 皚 藹 love 翺 See W dams strike to defeat issue 絆 to help bind the pound 謗 stripped saturated treasure bob Lifetime 鋇 狽 and tired tightness edited awareness change debate 辮 鼈 癟 endangered riverwalk A 擯 waffles flick 缽 Platinum connected carrot to 蠶 ashamed sad the side of the brightening cabin flies the barn the lateral registration layer 滄 toilet Cicadas 饞 讒 Dogfight spade factory makes trembling field try to compensate for the of the sausage plant money car thoroughly dust Chen Wei lined raising silk ugly closet kitchen She 雛 infrastructure piles broke creative cylinders Dolcevita simple resignation word of the smart onion chimney from the bush compact the fault of the loan is 竄 撣, 憚, 搗 Island Nongsa Пi Light Tang enemy 滌 締 the cushion to adjust the fishing overlap the top mole subscribe 錠 frozen Fighting 犢 plated forgings ribbons confirmed captured tons dull the goose of 訛 and bait to punish 貳, valve. 琺 Visit Lyon colorful graves the dung harvest Maple Feng Crazy Fung Sew Ironic Phoenix skin radiation were the 訃 and bondage tetrahydrate to do 稈 Car Longgang 臯 Hao stranded pigeons loft chrome for 龔 鞏 to hook the library's habit 蠱 The 剮 of the museum 閨 Track Tricks deli 劊 輥 Rolling pan country hackers Korea 閡 鶴 Hubbard Huan pot The 滬 to protect the and slow in exchange for paralyzed Longoza 渙, bribery 穢 燴 conceal to 誨 葷, 渾, accident, hunger, and the 譏. Squeeze a few 薊 the economics of the clip pods cheeks Steve potassium The destroyers 箋 to the 緘 of the tough cocoon to the berberine to alkaline chosen pick simple 儉 recommended threshold draw cheap See key warship sword 餞 Splash 澗 plasma 蔣 Propeller Award sauce watering proud delicate stirring 鉸 矯 僥 foot 餃 paying 絞 vehicles more 稭 stage penis Neck 痙 Tangled 廄 The old 駒 saw Huan the silk, and the H commandments to the She, and to the end plated cautious. Shan 鈞 forces 駿 Open the shell course settlements chickens copied library pants boast snobbish wide mines 曠 situation thanks 巋 Glimpse Feedback Breakdown Expand wide wax to rely on the blue fence intercept Basketball 闌 瀾 讕 攬 Browse lazy cables torn abused 撈 Labor 澇 music Softball tears Fence away She grit calendars Asphalt The Lotus Lian Lian Scythe poor ripples curtain 斂 facial link Alchemy Food cool two forgive 遼 鐐 hunting neighbors scales 凜 賃 age Fanling distillation leader Chris Lau Deaf

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.