<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-05-14
function openwindow(){
var mymessage;
message=prompt("新窗口打開網站")
if(mymessage==true)
{window.open('http://www.xianlaiwan.cn','_blank','width=400,height=500,menubar=no,toolbar=no, status=no,scrollbars=yes')}
else
{null}
}
var mymessage;
message=prompt("新窗口打開網站")
if(mymessage==true)
{window.open('http://www.xianlaiwan.cn','_blank','width=400,height=500,menubar=no,toolbar=no, status=no,scrollbars=yes')}
else
{null}
}
function add(){
var p1 = document.getElementById("p1");
p1.className="one";
}
function modify(){
var p2 = document.getElementById("p2");
p2.className="two";
}
var p1 = document.getElementById("p1");
p1.className="one";
}
function modify(){
var p2 = document.getElementById("p2");
p2.className="two";
}
2015-05-13
function hidetext()
{
var mychar = document.getElementById("con");
mychar.style.display="none";
}
function showtext()
{
var mychar = document.getElementById("con");
mychar.style.display="block";
}
{
var mychar = document.getElementById("con");
mychar.style.display="none";
}
function showtext()
{
var mychar = document.getElementById("con");
mychar.style.display="block";
}
2015-05-13
var mychar=document.getElementById("con");
mychar.style.color="red";
mychar.style.backgroundColor="#CCC";
mychar.style.width="300px";
mychar.style.color="red";
mychar.style.backgroundColor="#CCC";
mychar.style.width="300px";
2015-05-13
break;
case 1: tdiv.style.width='300px';
tdiv.style.height='300px';
break;
case 2:tdiv.style.display='none';
break;
case 3:tdiv.style.display='block';
break;
case 4:var x=confirm("are you sure quxiao");
if(x){
tdiv.removeAttribute('style');}
break;
}}}}
case 1: tdiv.style.width='300px';
tdiv.style.height='300px';
break;
case 2:tdiv.style.display='none';
break;
case 3:tdiv.style.display='block';
break;
case 4:var x=confirm("are you sure quxiao");
if(x){
tdiv.removeAttribute('style');}
break;
}}}}
window.onload =function(){
var tdiv=document.getElementById('txt');
var bt=document.getElementsByTagName('input');
for(var i=0;i<bt.length;i++)
{
bt[i].index=i;
bt[i].onclick=function (){
switch (this.index){
case 0:
tdiv.style.color='red';
tdiv.style.backgroundColor='yellow';
var tdiv=document.getElementById('txt');
var bt=document.getElementsByTagName('input');
for(var i=0;i<bt.length;i++)
{
bt[i].index=i;
bt[i].onclick=function (){
switch (this.index){
case 0:
tdiv.style.color='red';
tdiv.style.backgroundColor='yellow';
<script type="text/javascript">
function Wopen(){
window.open('http://www.xianlaiwan.cn','_blank','width=600','height=400','top=100','left=0')
}
</script>
</head>
<body>
<input name="button" type="button" onClick="Wopen()" value="點擊我,打開新窗口!" / >
function Wopen(){
window.open('http://www.xianlaiwan.cn','_blank','width=600','height=400','top=100','left=0')
}
</script>
</head>
<body>
<input name="button" type="button" onClick="Wopen()" value="點擊我,打開新窗口!" / >
2015-05-13
function openWindow(){
var conf=confirm('new window?');// 新窗口打開時彈出確認框,是否打開
if (conf){
var addr= prompt('addr ?','http://www.xianlaiwan.cn/');// 通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/
window.open(addr,'haha','width=400,height=500,menubar=no,toolbar=no');}
}
var conf=confirm('new window?');// 新窗口打開時彈出確認框,是否打開
if (conf){
var addr= prompt('addr ?','http://www.xianlaiwan.cn/');// 通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/
window.open(addr,'haha','width=400,height=500,menubar=no,toolbar=no');}
}
mychar.style.color="red";
mychar.style.backgroundColor="#CCC";
mychar.style.width="300px";
mychar.style.backgroundColor="#CCC";
mychar.style.width="300px";
2015-05-12