设置取消
<input type="button" value="取消设置" onclick="cancelSet()">
var title=document.getElementById("txt");
//定义"取消设置"的函数
function cancelSet(){
var cancel=confirm("arer u sure cancel?");
if(cancel==true){
txt.style.cssText="";
}
}
<input type="button" value="取消设置" onclick="cancelSet()">
var title=document.getElementById("txt");
//定义"取消设置"的函数
function cancelSet(){
var cancel=confirm("arer u sure cancel?");
if(cancel==true){
txt.style.cssText="";
}
}
function openWindow(){
var click = confirm("是否打开新窗口");
if (click){
var http=prompt("请输入网址");
window.open(http,'_blank','width=400,height=500,menubar=no,toolbar=no');
}
}
var click = confirm("是否打开新窗口");
if (click){
var http=prompt("请输入网址");
window.open(http,'_blank','width=400,height=500,menubar=no,toolbar=no');
}
}
function openWindow()
{
var click = prompt("想要打开请输入 true");
if (click == "true")
{
window.open('http://www.imooc.com','_blank','width=400,height=500,menubar=no,toolbar=no')
}
else
{
document.write("haha");
}
}
{
var click = prompt("想要打开请输入 true");
if (click == "true")
{
window.open('http://www.imooc.com','_blank','width=400,height=500,menubar=no,toolbar=no')
}
else
{
document.write("haha");
}
}
function openWindow()
{
var click = confirm("是否打开新窗口")
if (click == true)
{
window.open('http://www.imooc.com','_blank','width=400,height=500,menubar=no,toolbar=no')
}
else
{
document.write("haha");
}
}
{
var click = confirm("是否打开新窗口")
if (click == true)
{
window.open('http://www.imooc.com','_blank','width=400,height=500,menubar=no,toolbar=no')
}
else
{
document.write("haha");
}
}
var url = "http://www.imooc.com/";
function openWindow(){
var message = confirm("是否打开新窗口");
if(message == true){
prompt("请输入需要打开的网址",url); window.open(url,"_blank","width=400px,height=500px,menubar=no,toolbar=no");
}else{
document.write("谢谢~");
}}
function openWindow(){
var message = confirm("是否打开新窗口");
if(message == true){
prompt("请输入需要打开的网址",url); window.open(url,"_blank","width=400px,height=500px,menubar=no,toolbar=no");
}else{
document.write("谢谢~");
}}
document.write(mystr +"<br>"+ mychar);
document.write(mystr);
document.write(mychar);
document.write(mystr+"<br>");
document.write(mychar);
document.write(mystr);
document.write(mychar);
document.write(mystr+"<br>");
document.write(mychar);
2018-06-10
大概语法写错了一个单词,Object.style.property=new style;其中proerty应为propery,后者为属性,前者为财产
2018-06-10