faqts : Computers : Programming : Languages : JavaScript : Forms

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

11 of 110 people (10%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How do I reference a <div> object inside of a form?

Jul 12th, 2001 16:08
meng xianhui, Chris Lamb, amxh@21cn.com


You can use:
document.all.divId.perporties
for exam:
<form>
<input value="Test">
<div style="background-color:red" id=mxh>This is a DIV text</div>
<input type=submit>
</form>
<form>
<input type=button 
onclick="document.all.mxh.style.backgroundColor='navy'" value="change 
DIV backgroundcolor">
</form>
pls visit http://colorweb.go.163.com