最赞回答 / codechris
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8...
2016-07-17
function openWindow(){
var open = prompt("请输入要打开的网址");
window.open('http://'+open,'_blank','width=400,heigh=500');
}
输入网址,确定打开
var open = prompt("请输入要打开的网址");
window.open('http://'+open,'_blank','width=400,heigh=500');
}
输入网址,确定打开
function openWindow()
{
if(confirm("是否打开") == true)
{
window.open(prompt("打开的网址", "http://www.imooc.com/"), '_blank', 'width=400, height=500,menubar=no, toolbar=no')
}
}
{
if(confirm("是否打开") == true)
{
window.open(prompt("打开的网址", "http://www.imooc.com/"), '_blank', 'width=400, height=500,menubar=no, toolbar=no')
}
}
已采纳回答 / 慕粉3674908
var是用来申明mychar这个变量的。申明变量后,就可以用mychar存储document.getElementById("con");返回的html元素。之后,通过mychar变量就可以操作这个html元素了。
2016-07-16
最赞回答 / 要做Java大师
head和body都不是会自动换行和自动空格的标签,但是html默认出现在标签中的格式中存在的换行符和空格,如果不是自动换行的那类标签(比如<p>),都只给保留一个空格,所以检查一下标签和标签间的换行符就可以啦。
2016-07-16