CSS styles can also implement some similar script functions. For example, if you want to say "do not enter Chinese" today, you only need to add the following code to the CSS style:
Copy to ClipboardReference: [www.bkjia.com] ime-mode: disabled
(Note: the actual result is that the input method cannot be switched. That is to say, you can only enter the default input method. That is, you can only enter English)
<Style type = text/css> body {text-align: center; width: 900px; position: relative; margin: 0 auto; padding: 0 ;} </style> <div style = "margin-top: 50px;"> <textarea type = "text" style = "background-position: center; background-image: url (http://www.bkjia.com/bkjia.com/images/liehuo2009/addComent.gif); background-repeat: no-repeat; width: 600px; height: 400px; ime-mode: Disabled "onfocus =" if (this. value = 'Switch the input method. Enter Chinese here to try... ') this. value = ''" title = "I love Liehuo. net "> switch the input method, enter Chinese here to try... </textarea> </div> <br/> <center> If the result cannot be displayed, press Ctrl + F5 to refresh the page. For more webpage code: <a href = 'HTTP: // www.bkjia.com/'target = '_ blank'> http://www.bkjia.com/</a> </center>
Tip: the code can be modified before running!