<style?type="text/css">
??#div1{
??width:300px;
??height:300px;
??background-color:red;
??}
?</style>
??<script?type="text/javascript">
??window.onload=function(){
???function?kkk(){
var?obt=document.getElementById('div1');
??obt.style.width='400px';
??}?
????function?kk(){
var?obt=document.getElementById('div1');
??obt.style.height='400px';
??}?
????function?kkkk(){
var?obt=document.getElementById('div1');
??obt.style.background='green';
??}?
??}
??</script>?
?</head>
?<body>?????
<input?type="button"??value="變寬"?onclick="kkk()"?/>
<input?type="button"??value="變高"?onclick="kk()"?/>
<input?type="button"??value="變綠"?onclick="kkkk()"?/>
<div?id="div1">
</div>
</body>
</html>
真沒有思路了!
web愛好者3794645
2017-03-03 11:52:34