function openWindow(){
var tip=confirm("是否打開新網址?");
if(tip==true){var wangzhi=prompt("請編輯您要打開的網址","http://www.xianlaiwan.cn");
if(wangzhi!=null){window.open(wangzhi,"_blank",'width=400,height=400')
}
else{alert("您未確認打開新網址"); }
}
else{alert("您未確認打開新網址");
}
}
var tip=confirm("是否打開新網址?");
if(tip==true){var wangzhi=prompt("請編輯您要打開的網址","http://www.xianlaiwan.cn");
if(wangzhi!=null){window.open(wangzhi,"_blank",'width=400,height=400')
}
else{alert("您未確認打開新網址"); }
}
else{alert("您未確認打開新網址");
}
}
<script type="text/javascript">
function add(){
var p1 = document.getElementById("p1");
p1.className="one";
}
function modify(){
var p2 = document.getElementById("p2");
p2.className="two";
}
function add(){
var p1 = document.getElementById("p1");
p1.className="one";
}
function modify(){
var p2 = document.getElementById("p2");
p2.className="two";
}
2020-06-04
var mychar= document.getElementById("con");
mychar.style.color="white";
mychar.style.backgroundColor ="black";
mychar.style.width="1000px";
mychar.style.color="white";
mychar.style.backgroundColor ="black";
mychar.style.width="1000px";
2020-06-04
function openWindow(){
var mymessage=confirm("是否打開新窗口?");// 新窗口打開時彈出確認框,是否打開
if(mymessage==true)
{
window.open('http://www.xianlaiwan.cn','_blank','width=400,height=500,top=100,left=0,menubar=no,toolbar=no');
}
else
{
alert("滾犢子!");
}
}
var mymessage=confirm("是否打開新窗口?");// 新窗口打開時彈出確認框,是否打開
if(mymessage==true)
{
window.open('http://www.xianlaiwan.cn','_blank','width=400,height=500,top=100,left=0,menubar=no,toolbar=no');
}
else
{
alert("滾犢子!");
}
}
function Wopen(){
window.open('http://fjhtyznkj.cn.gongxuku.com/','_blank','width=1000,heigt=1000,top=100,left=0,menubar=no,toolbar=no, status=no,scrollbars=yes',);
}
</script>
</head>
<body>
<input name="button" type="button" onClick="Wopen()" value="親愛的請進來!" / >
window.open('http://fjhtyznkj.cn.gongxuku.com/','_blank','width=1000,heigt=1000,top=100,left=0,menubar=no,toolbar=no, status=no,scrollbars=yes',);
}
</script>
</head>
<body>
<input name="button" type="button" onClick="Wopen()" value="親愛的請進來!" / >
2020-06-04
<script type="text/javascript">
function Wopen(){
window.open('http://fjhtyznkj.cn.gongxuku.com/','_blank','width=1000','heigt=1000','top=100','left=0',);
}
</script>
</head>
<body>
<input name="button" type="button" onClick="Wopen()" value="親愛的請進來!" / >
function Wopen(){
window.open('http://fjhtyznkj.cn.gongxuku.com/','_blank','width=1000','heigt=1000','top=100','left=0',);
}
</script>
</head>
<body>
<input name="button" type="button" onClick="Wopen()" value="親愛的請進來!" / >
2020-06-04
function rec(){
var mymessage=confirm("你是女士?"); ;
if(mymessage==true)
{
document.write("你是女士!");
}
else
{
document.write("你是男士!");
}
}
var mymessage=confirm("你是女士?"); ;
if(mymessage==true)
{
document.write("你是女士!");
}
else
{
document.write("你是男士!");
}
}
2020-06-04
<script type="text/javascript">
function rec(){
var mychar="I love JavaScript";
alert(mychar);
}
function rec(){
var mychar="I love JavaScript";
alert(mychar);
}
2020-06-04
<script type="text/javascript">
function contxt() //定義函數
{
alert("哈哈,調用函數了!");
}
contxt();
</script>
</head>
<body>
<form>
<input type="button" value="點擊我" onclick="contxt()" />
function contxt() //定義函數
{
alert("哈哈,調用函數了!");
}
contxt();
</script>
</head>
<body>
<form>
<input type="button" value="點擊我" onclick="contxt()" />
2020-06-04
function openWindow(){var isOpen = confirm('是否打開?');
if (isOpen) {var isImooc = prompt('請輸入網址','http://www.xianlaiwan.cn/');
if(isImooc == 'http://www.xianlaiwan.cn/') {window.open('http://www.xianlaiwan.cn','_blank','width=400,height=500, menubar=no, toolbar=no'); }
}
}
if (isOpen) {var isImooc = prompt('請輸入網址','http://www.xianlaiwan.cn/');
if(isImooc == 'http://www.xianlaiwan.cn/') {window.open('http://www.xianlaiwan.cn','_blank','width=400,height=500, menubar=no, toolbar=no'); }
}
}