//定义"显示内容"的函数
function dd(){var ddd=document.getElementById("txt");
ddd.style.display="block";}
//定义"取消设置"的函数
function ee()
{
var eee=confirm("你确定要取消设置吗?")
if (eee=true)
{document.getElementById("txt").removeAttribute('style');}
}
else{return=null;}
function dd(){var ddd=document.getElementById("txt");
ddd.style.display="block";}
//定义"取消设置"的函数
function ee()
{
var eee=confirm("你确定要取消设置吗?")
if (eee=true)
{document.getElementById("txt").removeAttribute('style');}
}
else{return=null;}
//定义"改变颜色"的函数
function aa(){var aaa=document.getElementById("txt");
aaa.style.color="red";}
//定义"改变宽高"的函数
function bb(){var bbb=document.getElementById("txt");
bbb.style.width="400px";}
//定义"隐藏内容"的函数
function cc(){var ccc=document.getElementById("txt");
ccc.style.display="none";}
function aa(){var aaa=document.getElementById("txt");
aaa.style.color="red";}
//定义"改变宽高"的函数
function bb(){var bbb=document.getElementById("txt");
bbb.style.width="400px";}
//定义"隐藏内容"的函数
function cc(){var ccc=document.getElementById("txt");
ccc.style.display="none";}
function openWindow(){
var mydecide=confirm("确定用新窗口打开网站?");// 新窗口打开时弹出确认框,是否打开
if(mydecide==true)
{
var myid=prompt("请输入网址:","http://www.imooc.com");
if(myid!=null)
{
window.open(myid,'_blank','width=400,height=500,menubar=no,status=no')
}
}
大概是这样吧
var mydecide=confirm("确定用新窗口打开网站?");// 新窗口打开时弹出确认框,是否打开
if(mydecide==true)
{
var myid=prompt("请输入网址:","http://www.imooc.com");
if(myid!=null)
{
window.open(myid,'_blank','width=400,height=500,menubar=no,status=no')
}
}
大概是这样吧
<script type="text/javascript"></script>
2015-07-05
<script type="text/javascript">
document.write("少年开启JS之旅!");
</script>
document.write("少年开启JS之旅!");
</script>
2015-07-03