<script type="text/javascript">
function rec(){
var mymessage= confirm("你能兩腿劈開坐地上么?") ;
if(mymessage==true)
{
document.write("你是女士!");
}
else
{
document.write("你是男士!");
}
}
</script>
function rec(){
var mymessage= confirm("你能兩腿劈開坐地上么?") ;
if(mymessage==true)
{
document.write("你是女士!");
}
else
{
document.write("你是男士!");
}
}
</script>
2015-04-02
打開新窗口(window.open)
open() 方法用于打開一個新的窗口。
語法:
window.open(<URL>, <窗口名稱>, <參數字符串>)
參數說明:
URL:打開窗口的網址或路徑。
窗口名稱:被打開窗口的名稱??梢允?amp;quot;_top"、"_blank"、"_selft"等。
參數字符串:設置窗口參數,各參數用逗號隔開。
參數表:
open() 方法用于打開一個新的窗口。
語法:
window.open(<URL>, <窗口名稱>, <參數字符串>)
參數說明:
URL:打開窗口的網址或路徑。
窗口名稱:被打開窗口的名稱??梢允?amp;quot;_top"、"_blank"、"_selft"等。
參數字符串:設置窗口參數,各參數用逗號隔開。
參數表:
2015-04-01
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-04-01