var mychar= document.getElementById("con");
mychar.style.color="red";
mychar.style.backgroundColor='#CCC';
mychar.style.width='300px';
mychar.style.fontSize='50px';
mychar.style.color="red";
mychar.style.backgroundColor='#CCC';
mychar.style.width='300px';
mychar.style.fontSize='50px';
2016-07-22
已采纳回答 / Lyh_航
<!DOCTYPE html><html> <head> <title> new document </title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <script type="text/javascript"> function openWindow() { va...
2016-07-22
<script type="text/javascript">
function rec(){
var mymessage=confirm( "你有丁丁吗" ) ;
if(mymessage==true)
{
document.write("你是女士!");
}
else
{
document.write("你是男士!");
}
}
</script>
function rec(){
var mymessage=confirm( "你有丁丁吗" ) ;
if(mymessage==true)
{
document.write("你是女士!");
}
else
{
document.write("你是男士!");
}
}
</script>
2016-07-22
已采纳回答 / linglingchenchen
var value = prompt("一些提示。。。");if(value == "" || value == null) {// 如果取消输入则会返回null}
2016-07-22
function openWindow(){var a=confirm("请确认是否打开新窗口:?");if(a==true){var b=prompt(" 请输入新窗口网址:","http://www.imooc.com/"); if(b=="http://www.imooc.com/"){
window.open('http://www.imooc.com/','_blank','width=400 height=500 menubar=no toolbar=no');
}}else{ window.close();alert("打开新窗口操作已取消!");}}
window.open('http://www.imooc.com/','_blank','width=400 height=500 menubar=no toolbar=no');
}}else{ window.close();alert("打开新窗口操作已取消!");}}
最新回答 / 梦的离殇3704687
你在openUrl()这个方法里面的mywin变量前面多一个var,因为你这个var的问题 使这个方法里面的mywin不是方法外的mywin。 所以你下面那个方法里面的mywin是个空对象
2016-07-22
最新回答 / 水煮建筑
<script type="text/javascript"> function Wopen1(){ window.open( 'http://www.imooc.com', '_blank', 'width:600,height:400,top:1000,left:0,menubar:yes') } function Wopen2(){ window.open( 'http://http://www.ccb.com/', ...
2016-07-22