#center
에 할당 된 width
값을 어떻게 변경합니까? (CSS 파일간에 전환하고 싶지는 않습니다. 1이 width
값을 변경했기 때문입니다.) 자바 스크립트를 사용하여 값을 어떻게 동적으로 변경합니까?Javascript를 사용하여 요소 너비를 변경하려면 어떻게해야합니까?
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style type="text/css">
#main #center {
width: 600px; // change width to 700 on click
float: left;
}
#main #center .send {
background: #fff;
padding: 10px;
position: relative;
}
#main #center .send .music {
text-align: center;
margin-bottom: 10px;
}
#main #center .send .write {
font-family: georgia, serif;
font-size: 150px;
opacity: 0.2;
}
//....etc.
</style>
</head>
<body>
// change #center width to 700
<a href="#go2" onclick="how to change width of #center ???" ></a>
</body>
</html>