Several lines of code can easily achieve simplified and Complex Conversion of web pages

Source: Internet
Author: User

There are two ways to convert the simplified font of a web page: one is to use professional software such as "simplified font", and the other is to create two sets of web pages. Obviously, both methods are troublesome, and professional software is generally not used for free space. Here I will provide you with a very simple method. You only need to add several lines of code on the page to easily implement simple and complex web page conversion.

First:

<SCRIPT type = "text/JavaScript" Language = "JavaScript" src = "transform. js"> </SCRIPT>

<SCRIPT type = "text/JavaScript" Language = "JavaScript">

Function s2t ()

{Document. Body. innerhtml = Document. Body. innerhtml. s2t ();}

Function T2S ()

{Document. Body. innerhtml = Document. Body. innerhtml. T2S ();}

</SCRIPT>

Then, add the simplified and traditional conversion link to the webpage: <a href = "javascript: s2t ()"> traditional Chinese </a> <a href = "javascript: T2S () "> Simplified Chinese </a>

<SCRIPT type = "text/JavaScript" Language = "JavaScript" src = "transform. js"> </SCRIPT>

<SCRIPT type = "text/JavaScript" Language = "JavaScript">

Function s2t ()

{Document. Body. innerhtml = Document. Body. innerhtml. s2t ();}

Function T2S ()

{Document. Body. innerhtml = Document. Body. innerhtml. T2S ();}

</SCRIPT>

Then, add the simplified and traditional conversion link to the webpage: <a href = "javascript: s2t ()"> traditional Chinese </a> <a href = "javascript: T2S () "> Simplified Chinese </a>

After saving the page, click the "Traditional Chinese" link, and the page will become a traditional one. clicking "simplified Chinese" will automatically convert to the simplified form, making it easier for different users to select and browse.
==================
<! --
Function window. onload (){

VaR S = "and ugly professional Cong Dong Si lost two Yan Feng Lin Li Ju Yiwu leqiao Xi Xiang book shopping chaos in the loss of cloud imaya production Mu Qin Yi yi only Yuan from the Lun warehouse, the high-price crowd will attack the umbrella Wei Chuan and hurt the Lun Peng pseudo-queue, the rest of the Commission, the Xia, the investigation side, the overseas Chinese hacker, and the other two likes, the debt dumped the loss of compensation, the loss of storage, and the loss of the party, lan Guan xingz, the animal stock, the gang book, write the army Nong, Feng Zheng, the situation frozen, the net miserable Ling, cut together a few Phoenix with Kai hit the Cutting liu zhengchuang, the author of this article, said: "Do not allow others ?" the factory office experienced a severe pressure on the toilet room, and the comment of the xiaxiao County, the comment of the county, the double hair, the comment hey, hey, you can't, you can spray hey, you're in the group Park, you'll be in the middle of the world the old jiao Yu Ying Yu Miao Ma sun xuexiao Ning bao shi pet audit Xian Gong Kuan bin sleeping on the guidance of the Shou Yao er dust DEAD LAYER during the record session, I was a veteran of yuyu Township, yueda Township, yueda district. the curtain is covered with frames to help the blind man with powerful Power and the wide village qinglu library should be under the temple Pang waste when opening different abandon Zhang mi bending and playing strong when recording Yan che diameter yu Yi's sorrow and sorrow when pregnant with the state of sorrow and sorrow when the total amount of sorrow and sorrow, love and evil, Xiao Kai's anger and joy when hanging over the body of the fear of miserable death when I was used to death I am eager to block myself from being lazy, busy, and busy. I am eager to throw a flood of attackers, and I am eager to accept the report, pick it up, block it, and screw it up. choose to throw, and throw, and throw. spread the game, hold the game, and gather the enemy to collect the data, fight the fight, cut off the old time when the day is running, the sun is shining, Xiao, dizzy, and Hui is temporarily reading the log, simple machine, and killing the sub-authority yang Xiaojie is a powerful component of Shushu, Zao, zhuyun, fengxiao, Cabinet, zhuyun, grid, standard stack, zhuanqiang, shuqi, shuqi, zhuqiao uniform propeller pile dream ghost detection zookeeper louddb loud.com louddb for redis when the hub is destroyed, the hub is broken, and the gas Hydrogen and argon gas are collected, the Chinese sewage soup is delayed, and the troughs are not lost. jie zeyu Shomu yomu yundun yomu Zun yu Wen you wan wet burst and splash; rolling and lagging; full of dirty water filters abuse luhe beach, yellow, and so on please stew in the furnace Wei Yi points to refining the rotten hydrocarbon candle smoke annoying Yade stew hot burning yellow yarn Yarn the only lion in the United States, the lion, the prison, the hunting, the swine, the cat, the iotg, the horse, the horse yellow yellow electric painting Chang Yi domain therapy malaria yellow sore crazy blister Yellow the monitoring system of the salt and the theft of the disk is wide and wide. The farsighted correction of the copper ore is the code brick. alkali yarn lime Thank you for praying for the curse of Lu Chan from the bald stalk kind of product said Yan Shan tax said stable Lu poor stealing kiln nest view sinus vertical competing bamboo pen stick to the cage to build a screening and Zheng to raise the signing of a simple pair of zookeeper basket barrier zookeeper indica rice and Guangdong manure grain zookeeper about yarn Yarn when shaojie was tied by the velvet knot, the hacker was painted to the hacker, and the hacker was twisted to the silk embroidery, and the hacker followed the performance of the notebook and continued to maintain the rope. cotton silk he is always confused, and he is always confused. deaf employee contact Cong su intestinal skin kidney swelling and threat gallbladder shengyu titanium gum pulse dirty umbilical brain pus foot off the yellow face wax-cured ankle greasy Fuxi Teng yu Ship Cabin Yu Yan Yi festival Wu Lu Yi yi Lu Yi si Cang su Yun Ping stems and leaves dang Rong Yu Ying Yu lu Ying Xiao Sa leeching Lu Ji yundun the flies, the cockroaches, the rank, the supplements, the so, And the tops, the crotch, the slashes, And the slashes. i'm sorry, I'm sorry. litigation: An Investigation of the evidence, an evaluation of the evidence, an investigation of fraud, a complaint, a diagnosis of fraud, a comment, a comment please refer to the following documents for more information: Please tell me what you want to do. lie to me and tell me what it means to tell me what it means. yugu beibeizhen is responsible for the loss of the financial responsibilities of the sages, the goods quality of the vendors, the poor, the purchase and storage of the goods, the price of the loan and trade fee He Yi, the thief Jia you have to pay for your money, pay for it, and pay for it. when the system is running, the rolling stock of rolling stock qingyi qingshi's sedan chair was often used as a secondary vehicle, luhui roll rim, and other components. this is a far-reaching violation of the race. Even if you have a long history, you can select a poor delivery system and leave it away. shishi Lixiao xiaojian baiyan tungsten tunnel Tunnel cobalt lithium-locking Pan zirconium OS rust file front zinc-coated Iron the key saw manganese was chopped into the hand, the hand jing di Wei Yu Cheng Ma Lan LAN long door latches flash when closing the Q He he Li Xiao Li when there is no congestion in the gate, you will hear about the threshold of the valve, and then you will try again. yin array stage Lu Yu Chen Yu Shaanxi Province insurance with hidden likes difficult young Xiao Wu Yan Jing Yu Wei Ren Yi Han Yu Tao Yun page top of the top of the neck of the mouth apsaradb for hybriddb for MySQL the wonton bread contains wonton bread and wonton bread. the horse was running on the horse, and the horse was running in the camel. zookeeper zookeeper hip joint catfish zookeeper inspector inspector the birds of the birds, the birds zookeeper zookeeper zookeeper zookeeper fan song in the consultation team did not try the dirty work ";

VaR T = "why is it necessary to adjust the legal value of the two major industries? Why does it mean that the legal value of the legal representative is limited? Why does it mean that the legal value of the legal representative has reached the Asian market? we are pleased to announce that our staff will participate in the joint venture with Alibaba Cloud's Senior Technical Support Team. please refer to the following link for more information: please refer to the following documents for more information: in our region, we have provided a number of dynamic route for Traffic Distribution in our region. why does it happen? I have heard that there are too many legal support staff who have already been informed? there have been several major issues in the country, and there has been a number of major issues in the country. when the market is busy, there will be a huge number of attacks. when my website is being processed, my website is being processed, and my website is being reviewed. please refer to the Practice below for more information. please refer to the following link for more information: please refer to the following link for more information: I have always been notified of the problem. alibaba Cloud please refer to the following link for more information: when there is no operation in the data bank, there will be a number of unauthorized users who have been authorized to access the website. please refer to the following link for more information: please refer to the following link for more information: in addition, there has been a number of attacks in the market, and there has been no improvement in the market. please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: there have been many other problems in the future. please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: there are two major causes for this problem: please refer to the following link for more information: after reading the relevant documents, I wrote some suggestions to some technical experts who have been using these documents. please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following table for more information: however, I think our customers have already been notified of the problems they have encountered. Our customers are expected to have their own rights reserved. this article discusses the legal representative's legal representative please refer to the following example for more information: please refer to the following link for more information: please refer to the following link for more information: alibaba Cloud's website is based on Alibaba Cloud's website. there will be a number of large numbers of small numbers please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: there are two major reasons for this problem: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: there are two major issues in this field: Why? please refer to the following link for more information: there are already many problems in the market. please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: there are too many other problems in the future. There are too many problems in the future ";

Function string. Prototype. s2t (){
VaR K = '';
For (VAR I = 0; I <this. length; I ++) K + = (S. indexof (this. charat (I) =-1 )? This. charat (I): T. charat (S. indexof (this. charat (I )))
Return K;
}

Function string. Prototype. T2S (){
VaR K = '';
For (VAR I = 0; I <this. length; I ++) K + = (T. indexof (this. charat (I) =-1 )? This. charat (I): S. charat (T. indexof (this. charat (I )))
Return K;
}

}
-->

}
-->

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.