<script type="text/javascript">
function openWindow(){
var open = confirm("是否打開窗口?");
if(open==true){
var winOpen = prompt("請輸入打開的網址!","http://www.xianlaiwan.cn");
window.open(winOpen,"_blank","width=400,height=500,menubar=no,toolbar=no");
}
}
function openWindow(){
var open = confirm("是否打開窗口?");
if(open==true){
var winOpen = prompt("請輸入打開的網址!","http://www.xianlaiwan.cn");
window.open(winOpen,"_blank","width=400,height=500,menubar=no,toolbar=no");
}
}
function openWindow(){
var open=confirm("open the window?");
if(open==true){
open2=prompt('are y sure?','www.baidu.com')
if(open2){
window.open('www.baidu.com');
}
}
}
var open=confirm("open the window?");
if(open==true){
open2=prompt('are y sure?','www.baidu.com')
if(open2){
window.open('www.baidu.com');
}
}
}
window.open('1','2','3');
2016-04-07
prompt里面的兩個參數,第一個參數是用來進行提示的,所以不可改變,第二個參數是輸入的文本內容,返回什么是根據具體條件判斷的
2016-04-07
document.getElementById("p1").style.color="blue"
設置Id為p1的顏色
設置Id為p1的顏色
2016-04-07
function rec(){
var mymessage=confirm("跟我交往吧") ;
if(mymessage==true)
{
document.write("我是gay!");
}
else
{
document.write("好人卡+1!");
}
}
var mymessage=confirm("跟我交往吧") ;
if(mymessage==true)
{
document.write("我是gay!");
}
else
{
document.write("好人卡+1!");
}
}
2016-04-07