function cancer(){
if(confirm("come on!!! dragon")){
var txt5 = document.getElementById("txt");
txt5.style.color="#000";
txt5.style.backgroundColor="#fff";
txt5.style.width="600px";
txt5.style.height="400px";
txt5.style.display="block";
}
}
if(confirm("come on!!! dragon")){
var txt5 = document.getElementById("txt");
txt5.style.color="#000";
txt5.style.backgroundColor="#fff";
txt5.style.width="600px";
txt5.style.height="400px";
txt5.style.display="block";
}
}
最新回答 / 柳寒烟
a beautiful code<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" Content="text/html; charset=utf-8" /><title>javascript</title><style type="text/css">body{font-size:12px;}#txt{ height:400px; width:60...
2015-07-11
<script language="javascript"></script>这个玩意可以简称=======<script></script>!!!!!!!!!!!
2015-07-11
已采纳回答 / Perona
<...code...>这里缺引号和单位<...code...><...code...>这里括号改成英文的即可<...code...><...code...>不要用reset(),重置不了,建议用removeAttribute()<...code...>完整代码<...code...>
2015-07-11
显示和隐藏
object.style.display="value"
value取none和block(块状元素)
object.style.display="value"
value取none和block(块状元素)
2015-07-10
定义"取消设置"的函数
oBtn5.onclick=function(){
var mymessage= confirm("是否取消设置") ;
if(mymessage==true)
{
oTxt.style.color="#333";
oTxt.style.backgroundColor="#fff";
oTxt.style.width="600px";
oTxt.style.height="400px";
oTxt.style.display="block";
}
oBtn5.onclick=function(){
var mymessage= confirm("是否取消设置") ;
if(mymessage==true)
{
oTxt.style.color="#333";
oTxt.style.backgroundColor="#fff";
oTxt.style.width="600px";
oTxt.style.height="400px";
oTxt.style.display="block";
}
第一次见到这样的方式教学 虽然有些太简单 但跟玩游戏一样 另外这个代码编辑器的渲染效果真好看 就都做完吧
2015-07-10
var mychar= document.getElementById("con");
mychar.style.color='red';
mychar.style.backgroundColor='#ccc';
mychar.style.width="300px";
直接用background也能改
mychar.style.color='red';
mychar.style.backgroundColor='#ccc';
mychar.style.width="300px";
直接用background也能改
2015-07-10
<script type="text/javascript">
var mychar= document.getElementById("con");
mychar.style.color = "red";
mychar.style.backgroundColor = "#CCC";
mychar.style.width = "300px";
</script>
var mychar= document.getElementById("con");
mychar.style.color = "red";
mychar.style.backgroundColor = "#CCC";
mychar.style.width = "300px";
</script>
2015-07-10