<script type="text/javascript">
function hidetext()
{
var mychar = document.getElementById("con");
mychar.style.display="none";
}
function showtext()
{
var mychar = document.getElementById("con");
mychar.style.display="block";
}
</script>
function hidetext()
{
var mychar = document.getElementById("con");
mychar.style.display="none";
}
function showtext()
{
var mychar = document.getElementById("con");
mychar.style.display="block";
}
</script>
2016-05-28
已采纳回答 / Werk_Bicth
在HTML中target目标的四个参数的用法:target="_self"表示:将链接的画面内容,显示在目前的视窗中。(内定值) 。 即:同窗口打开target="_parent"表示:将链接的画面内容,当成文件的上一个画面。即:当前窗口打开。target="_top"表示:将框架中链接的画面内容,显示在没有框架的视窗中(即除去了框架)。即:顶端打开窗口。target="_blank"表示:将链接的画面内容,在新的浏览视窗中打开。即:打开新窗口。当网页没有框架时,target="_self"和target...
2016-05-28
//定义"隐藏内容"的函数
function neirong(){
num.style.display="none";
}
//定义"显示内容"的函数
function xianshi(){
num.style.display="block";
}
//定义"取消设置"的函数
function quxiao(){
var qu = confirm("是否取消设置?")
if(qu==true){
num.style.cssText='';
num1.style.cssText='';
}
}
function neirong(){
num.style.display="none";
}
//定义"显示内容"的函数
function xianshi(){
num.style.display="block";
}
//定义"取消设置"的函数
function quxiao(){
var qu = confirm("是否取消设置?")
if(qu==true){
num.style.cssText='';
num1.style.cssText='';
}
}
var num = document.getElementById("txt");
var num1 = document.getElementById("con");
//定义"改变颜色"的函数
function yanse(){
num1.style.color="red";
num.style.backgroundColor="blue";
}
//定义"改变宽高"的函数
function kuangao(){
num.style.width="200px";
num.style.height="200px";
}
var num1 = document.getElementById("con");
//定义"改变颜色"的函数
function yanse(){
num1.style.color="red";
num.style.backgroundColor="blue";
}
//定义"改变宽高"的函数
function kuangao(){
num.style.width="200px";
num.style.height="200px";
}
已采纳回答 / 慕九州7930838
你好,我来解答一下你这个问题。<...code...>首先是先需要执行if判断条件的语句的,即要先执行confirm(""),若执行结果为真,则执行设置语句;如果为假,则判断失败,跳出循环。
2016-05-28
window.open('http://www.imooc.com','_blank','width=600,height=400,margin-top=100,margin-left=0')
2016-05-28
function Wopen(){
alert("页面会在原页面打开");
var xxx=prompt("点击取消返回原页,或请输入你想进入的网址:", "http://");
if (xxx == null){
window.open('http://www.imooc.com/code/412','_self', 'scrolling=yes' )
}else{
window.open(xxx,'_self', 'scrolling=yes');
}
}
alert("页面会在原页面打开");
var xxx=prompt("点击取消返回原页,或请输入你想进入的网址:", "http://");
if (xxx == null){
window.open('http://www.imooc.com/code/412','_self', 'scrolling=yes' )
}else{
window.open(xxx,'_self', 'scrolling=yes');
}
}
2016-05-28
function openWindow()
{var new1;
var new2;
new1=confirm("是否打开本网页");
if(new1==true)
{
new2=prompt("开这个?","http://www.imooc.com/")
if(new2!=null)
{window.open(new2,"_blank",'width=400px,height=500px ,menubar=no,toolbar=no');
}
else
{alert("你再一次失去了本宝宝");
}
}
else{
alert("你将失去本宝宝");
}
}
{var new1;
var new2;
new1=confirm("是否打开本网页");
if(new1==true)
{
new2=prompt("开这个?","http://www.imooc.com/")
if(new2!=null)
{window.open(new2,"_blank",'width=400px,height=500px ,menubar=no,toolbar=no');
}
else
{alert("你再一次失去了本宝宝");
}
}
else{
alert("你将失去本宝宝");
}
}