mychar.style.color="red";
mychar.style.backgroundColor="#CCC";
mychar.style.width="300px";
mychar.style.backgroundColor="#CCC";
mychar.style.width="300px";
2016-04-12
function openWindow(){
var mymessage=confirm("是否確認打開新窗口?")
if(mymessage==true)
{var url=prompt("請輸入網址:","http://www.xianlaiwan.cn")
window.open(url,"_blank","width=400,height=500,menubar=no,toolbar=no");}
else
{document.write("你沒有打開任何窗口");}
}
var mymessage=confirm("是否確認打開新窗口?")
if(mymessage==true)
{var url=prompt("請輸入網址:","http://www.xianlaiwan.cn")
window.open(url,"_blank","width=400,height=500,menubar=no,toolbar=no");}
else
{document.write("你沒有打開任何窗口");}
}
function rec(){
var mymessage=confirm("你是不是沒有JJ?") ;
if(mymessage==true)
{
document.write("你是女士!");
}
else
{
document.write("你是男士!");
}
}
哈哈,純屬娛樂
var mymessage=confirm("你是不是沒有JJ?") ;
if(mymessage==true)
{
document.write("你是女士!");
}
else
{
document.write("你是男士!");
}
}
哈哈,純屬娛樂
2016-04-12
document.write(mychar+"<br>");
document.write(mystr+mychar+"的忠實粉絲!");
document.write(mystr+mychar+"的忠實粉絲!");
2016-04-11
function openWin(){
var judge = confirm("是否建立新網頁?");
if(judge == true){
var newWebUrl=prompt("請輸入網址:","例如:baidu");
if(newWeb!=null){
window.open('http://www.'+newWebUrl+'.com','_blank','width=400,height=500,menubar=no,foolbar=no');
}else{alert("你沒有出入網址!");}
}else{alert("你選擇了退出。");}
}
var judge = confirm("是否建立新網頁?");
if(judge == true){
var newWebUrl=prompt("請輸入網址:","例如:baidu");
if(newWeb!=null){
window.open('http://www.'+newWebUrl+'.com','_blank','width=400,height=500,menubar=no,foolbar=no');
}else{alert("你沒有出入網址!");}
}else{alert("你選擇了退出。");}
}
function openWin(){var judge = confirm("是否建立新網頁?");if(judge == true){var newWeb=prompt("請輸入網址:","例如:baidu");if(newWeb!=null){ window.open('http://www.'+newWeb+'.com','_blank','width=400,height=500,top=50,left=50,menubar=no,foolbar=no,status=no');}else{alert("你沒有出入網址!");}}else{alert("你選擇了退出。");}}
<script type="text/javascript">
function hidetext()
{
var mychar = document.getElementById("con");
mychar.style.display="none";
}
function showtext()
{
var mychar = document.getElementById("con");
mychar.style.display="block";
}
</script>
function hidetext()
{
var mychar = document.getElementById("con");
mychar.style.display="none";
}
function showtext()
{
var mychar = document.getElementById("con");
mychar.style.display="block";
}
</script>
2016-04-11
</head>
<body>
<h1 onmouseover="showtext()" onmouseout="hidetext()">JavaScript</h1>
<p id="con">做為一個Web開發師來說,如果你想提供漂亮的網頁、令用戶滿意的上網體驗,JavaScript是必不可少的工具。</p>
</body>
</html>
<body>
<h1 onmouseover="showtext()" onmouseout="hidetext()">JavaScript</h1>
<p id="con">做為一個Web開發師來說,如果你想提供漂亮的網頁、令用戶滿意的上網體驗,JavaScript是必不可少的工具。</p>
</body>
</html>
2016-04-11