w3schools
  
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About

Textarea Object cols Property


Textarea Object Reference Textarea Object

Definition and Usage

The cols property sets or returns the width of a text area.

Syntax

textareaObject.cols=number_of_columns


Example

The following example changes the width of a text area:

<html>
<head>
<script type="text/javascript">
function changeCols()
  {
  document.getElementById('txt1').cols="20";
  }
</script>
</head>
<body>

<textarea id="txt1">
Hello world....This is a text area
</textarea>
<br />
<input type="button" onclick="changeCols()" value="Change width" />

</body>
</html>


Textarea Object Reference Textarea Object

WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Web Hosting
FREE Web Hosting
Top Web Hosting
Cheap UK Web Hosting
WEB BUILDING
XML Editor – Free Trial!
FREE Flash Website
FREE Web Templates
SEO Company
EDUCATION
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification
STATISTICS
Browser Statistics
Browser OS
Browser Display
FLIGHT TICKETS
Find the cheapest flight
to any destination now!
SHARE THIS PAGE