<input type="button" value="取消設置" onclick="cancel()">
//定義"取消設置"的函數
function cancel(){
var cl=confirm("取消設置?")
if (cl==true){
var cl=document.getElementById("con");
cl.removeAttribute("style");
}else{
alert('未取消')
}
}
//定義"取消設置"的函數
function cancel(){
var cl=confirm("取消設置?")
if (cl==true){
var cl=document.getElementById("con");
cl.removeAttribute("style");
}else{
alert('未取消')
}
}
function openWindow(){
var put=confirm("請確認要打開的窗口:");
if(put=true){
window.open('http://www.xianlaiwan.cn','_blank','width=400,height=500,menubar=no,toolbar=no, status=no,scrollbars=yes'));
}
}
var put=confirm("請確認要打開的窗口:");
if(put=true){
window.open('http://www.xianlaiwan.cn','_blank','width=400,height=500,menubar=no,toolbar=no, status=no,scrollbars=yes'));
}
}
function openWindow(){
var isopen=confirm("是否打開?");
if(true==isopen){
var yoururl=prompt("請輸入您的網址","http://www.xianlaiwan.cn/");
window.open(yoururl,'_blank','width=400,height=500,menubar=no,toolbar=no, status=no,scrollbars=no');
}else{
alert("您沒與選擇打開。");
}
}
var isopen=confirm("是否打開?");
if(true==isopen){
var yoururl=prompt("請輸入您的網址","http://www.xianlaiwan.cn/");
window.open(yoururl,'_blank','width=400,height=500,menubar=no,toolbar=no, status=no,scrollbars=no');
}else{
alert("您沒與選擇打開。");
}
}
document.write("神奇的JS,快把我們隱藏了!");// 快快把我變成單行注釋
/*知道嗎
JS可以實現很多動態效果
快來學習吧!*/
/*知道嗎
JS可以實現很多動態效果
快來學習吧!*/
2019-03-18
為毛我直接
var mychar = document.getElementById('con');
mychar.style.cssText = 'color: red; background: red; width: 300px;'
什么鬼校驗,太low了吧???
var mychar = document.getElementById('con');
mychar.style.cssText = 'color: red; background: red; width: 300px;'
什么鬼校驗,太low了吧???
2019-03-14
function openWindow(){
var a= confirm("do you want to open inter?");
if(a==true){
window.open("http://www.xianlaiwan.cn","_blank","height=500,width=400")
}
else{
alert("您沒與選擇打開。");
}
}
var a= confirm("do you want to open inter?");
if(a==true){
window.open("http://www.xianlaiwan.cn","_blank","height=500,width=400")
}
else{
alert("您沒與選擇打開。");
}
}
真的無語這個教程。。??戳撕眯┚渥記]得謂語沒得賓語不說,到dom每一章一個什么新東西都不解釋清楚,全都逼著人到別的地方查看得懂的。。。
真的是百度兩分鐘,啃教程一小時
真的是百度兩分鐘,啃教程一小時
2019-03-05