2
3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> new document </title> <meta name="generator" content="editplus" /> <meta name="author" content="Gao YiXiang" /> <meta name="email" content="yixianggao@126.com" /> <meta name="keywords" content="javascript dhtml dom" /> <meta name="description" content="I love web development." /> </head> <body> <hr id="hrTest" color="red" style="height: 10px;" /> <input type="button" id="btnAdd" value="Add" /> <script type="text/javascript"> <!-- btnAdd.onclick = function() { hrTest.style.height = parseInt(hrTest.style.height) + 10; this.value = "hrTest.size is " + hrTest.style.height; }; //--> </script> </body> </html>