<script>
function doit(w){
abc.style.width=w;
}
</script>
<input type=text name="" onkeyup="doit(this.value)"><input type=button id=abc style="width:333px;height:50px" value=" 快给我分呀!再有70就2000经验了!看看变不变角:-P ">
function doit(w){
abc.style.width=w;
}
</script>
<input type=text name="" onkeyup="doit(this.value)"><input type=button id=abc style="width:333px;height:50px" value=" 快给我分呀!再有70就2000经验了!看看变不变角:-P ">
top:<input id=a2 value=200><br>
width:<input id=a3 value=100><br>
height:<input id=a4 value=100><br>
<input id=a5 type=button onclick=change() value=Change style="position:absolute">
<script>
function change(){
a5.style.left=parseInt(a1.value)
a5.style.top=parseInt(a2.value)
a5.style.width=parseInt(a3.value)
a5.style.height=parseInt(a4.value)
}
</script>
左:<input name=l width=5><br>
右:<input name=t width=5><br>
宽:<input name=w width=5><br>
高:<input name=h width=5><br>
<input type=button value="change" onclick="javascript:document.all.b1.style.left=document.all.l.value;document.all.b1.style.top=document.all.t.value;document.all.b1.style.width=document.all.w.value;document.all.b1.style.height=document.all.h.value">
TEST按钮的新高:<input name=h size=8 value=50><br>
TEST按钮的新宽:<input name=w size=8 value=300><br>
<input type=button value=改变 onclick=cc()>
<script language=javascript>
function cc()
{
with(document.all)
{
if(h.value=="" || w.value=="")return;
test.style.width = w.value;
test.style.height= h.value;
}
}
</script>
top:<input id=a2 value=200><br>
width:<input id=a3 value=100><br>
height:<input id=a4 value=100><br>
<input id=a5 type=button onclick=change() value=Change style="position:absolute">
<script>
function change(){
width(document.all.a5.style){
left=parseInt(a1.value)
top=parseInt(a2.value)
width=parseInt(a3.value)
height=parseInt(a4.value)
}
}
</script>
如下所示,点按钮4时可更改变化按钮
<input type="button" name="Submit3" value="变化按钮" id="changebutton">
<input type="button" name="Submit4" value="按钮4" onclick="sgsg('changebutton')">
宽度:<input type="text" name="width">
高度:<input type="text" name="height">
<div id=gggg></div>
<script>
function sgsg(name)
{
var obj = document.getElementById(name);
try{
obj.style.width=parseInt(document.all.width.value);
obj.style.height=parseInt(document.all.height.value);
}
catch(execption)
{
alert("输入值值不正确");
}
}
</script>
呵呵
lzj_freedom() 兄,多谢成全! 我把70分再退给你吧 :)