Live Chat Icon For mobile
Live Chat Icon

How can you resize the html elements dynamically?

Platform: ASP.NET| Category: Client Side Scripting

Html elements can be resized dynamically by using the style properties. In the below example the TextArea size is
increased dynamically on clicking the button.

	<script language=javascript>
		function resize()
	<form name=form1>
		<TextArea  style='WIDTH: 200px; HEIGHT: 200px' name='TextArea1'></TextArea>
		<input type='button' style='WIDTH: 100px; HEIGHT: 100px' name='button1'> 
	<input type=button value='ClickMe' onclick=javascript:resize()>

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.