Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

javascript - Changing the Font and font Size in a textarea field -


using following code sample:

<html> <body>  <script language = "javascript">  maxl=240; var bname = navigator.appname; function talimit(taobj) {  if (taobj.value.length==maxl) return false;  return true; }  function tacount(taobj,cnt) {   objcnt=createobject(cnt);  objval=taobj.value;  if (objval.length>maxl) objval=objval.substring(0,maxl);  if (objcnt) {   if(bname == "netscape"){     objcnt.textcontent=maxl-objval.length;}   else{objcnt.innertext=maxl-objval.length;}  }  return true; } function createobject(objid) {  if (document.getelementbyid) return document.getelementbyid(objid);  else if (document.layers) return eval("document." + objid);  else if (document.all) return eval("document.all." + objid);  else return eval("document." + objid); } </script> <font face="arial" font size="2"> maximum number of characters text box 240.</font><br>  <textarea onkeypress="return talimit(this)" onkeyup="return tacount(this,'mycounter')" name="message" rows=6 wrap="physical" cols=42> </textarea> <br> <font face="arial" font size="2"> have <b><span id=mycounter>240</span></b> characters remaining  message</font>  </body> </html> 

how change font , font size in textarea?

use css define style textarea element. example:

textarea {    font-size: 20pt;    font-family: arial; }  

note there three ways add css website -- can use external stylesheet, internal stylesheet, or inline styles (or combination thereof).

using internal stylesheet might this:

<head> <style type="text/css"> textarea {    font-size: 20pt;    font-family: arial; }  </style> </head>  <!-- rest of code goes here... --> 

see here more information on styling textarea.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -