admin管理员组文章数量:1390948
I want to change language of textbox to marathi in html file My code is as follows but it not working
<html lang="mr" xml:lang="en">
<head></head>
<body>
<textarea style="height:200px;width:200px;font-family:Mangal">
</textarea>
</body>
</html>
I want to change language of textbox to marathi in html file My code is as follows but it not working
<html lang="mr" xml:lang="en">
<head></head>
<body>
<textarea style="height:200px;width:200px;font-family:Mangal">
</textarea>
</body>
</html>
Share
Improve this question
edited Oct 18, 2015 at 13:16
Laxmikant Dange
asked Jul 10, 2013 at 12:22
Laxmikant DangeLaxmikant Dange
7,7186 gold badges43 silver badges67 bronze badges
6
- language or font-family? – balexandre Commented Jul 10, 2013 at 12:23
- 3 Change language? Users can type whatever they want in there. If you are referring to browser spellcheckers, I don't think you can disable them from your webpage. – imulsion Commented Jul 10, 2013 at 12:24
- other software is needed if you want to type other language. – Arun Killu Commented Jul 10, 2013 at 12:26
-
@imulsion, it may be possible to disabled spellcheckers, using the
spellcheck
IDL attribute, but I don’t think spellchecking is relevant here. – Jukka K. Korpela Commented Jul 10, 2013 at 13:35 -
The root element has two conflicting attributes about language. The
textarea
element would inherit the setting, but you need to decide between Marathi and English. The language setting has remarkably little impact on browsers, and it surely does not change the way input widgets work. You should rewrite your question in terms of the the desired functionality. What is “not working”, and how should it work? – Jukka K. Korpela Commented Jul 10, 2013 at 13:40
4 Answers
Reset to default 1I hope you meant Font and not language...
first of all, give that textarea
an id
and a class
, for example
<textarea id="txtArea" class="textarea" style="height:200px;width:200px;font-family:Mangal">
</textarea>
then let's get ride of that bad inline style coding and have either an external stylesheet or inside the <head>
this:
<style>
.textarea { height:200px; width:200px; font-family:Mangal }
</style>
so now it would be clean as
<textarea id="txtArea" class="textarea">
</textarea>
to change the font, just do:
from javascript
txtArea.style.fontFamily = "Arial";
from stylesheet
.textarea { height:200px; width:200px; font-family:'Arial' }
or, if you can't ride the inline styles, add the id
and call the javascript.
I don't recall if the font-family:'Arial' !important
gets prioritize from an inline style, but you can also try that.
It could not be done using html tag attributes, css styles or Javascript
Perhaps you could use the Google Input Tools
Install it with Marathi pack and you could start typing in Marathi
http://www.google.co.in/inputtools/
A draw back is that it should be installed on all the systems the application uses.If it's an intranet app then it would be fine.
there is no tags in html which will allow you to type in marathi. You can download specific tools
http://www.google.co.in/inputtools/
http://t13n.googlecode./svn/trunk/blet/docs/help_mr.html
but it will not be specific to certain div or tags it will get applied to every application.
本文标签: javascriptHow to Change input language of textbox in htmlStack Overflow
版权声明:本文标题:javascript - How to Change input language of textbox in html? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744659861a2618179.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论