function rec(){
var str=confirm("你是 猴子 請來 的 逗逼 嗎 ?");
var yes="快來圍觀 ,這里 有個 逗逼 !";
var no="那 你來 這里 干什么 ?";
if(str==true){
alert(yes);
}else{
document.write(no) ;
}
var str=confirm("你是 猴子 請來 的 逗逼 嗎 ?");
var yes="快來圍觀 ,這里 有個 逗逼 !";
var no="那 你來 這里 干什么 ?";
if(str==true){
alert(yes);
}else{
document.write(no) ;
}
2016-06-23
type="text/javascript" 現在應不用寫了,默認腳本就是javasript
2016-06-23
function rec(){
var mayessage=confirm(你約了嗎?);
if(myessage==true)
{document .write("感覺不錯呦!")}
else
{document .write("你太Low了")}
}
var mayessage=confirm(你約了嗎?);
if(myessage==true)
{document .write("感覺不錯呦!")}
else
{document .write("你太Low了")}
}
2016-06-23
<h2 id="con">I Hate JavaScript</H2>
<p>文本內容</p>
<script type="text/javascript">
var mychar= document.getElementById("con");
con.style.color="#fff";
con.style.backgroundColor="#f60";
con.style.width="300px";
con.style.height="30px";
mychar.innerHTML="I LOVE JAVASCRIPT";
<p>文本內容</p>
<script type="text/javascript">
var mychar= document.getElementById("con");
con.style.color="#fff";
con.style.backgroundColor="#f60";
con.style.width="300px";
con.style.height="30px";
mychar.innerHTML="I LOVE JAVASCRIPT";
2016-06-23
function add(){
var p1 = document.getElementById("p1");
p1.className = p1.className== "one" ? "two" :"one" ;
}
function modify(){
var p2 = document.getElementById("p2");
p2.className = p2.className== "one" ? "two" :"one" ;;
}
var p1 = document.getElementById("p1");
p1.className = p1.className== "one" ? "two" :"one" ;
}
function modify(){
var p2 = document.getElementById("p2");
p2.className = p2.className== "one" ? "two" :"one" ;;
}
2016-06-23