function openWindow(){
var a=confirm("是否打开?")
if(a=true){
window.open('http://www.imooc.com','_blank','width=400,height=500,menubar=no,schollbar=no');
}
}
var a=confirm("是否打开?")
if(a=true){
window.open('http://www.imooc.com','_blank','width=400,height=500,menubar=no,schollbar=no');
}
}
最新回答 / 慕粉3545084
这里返回的 一个HTMLParagraphElement对象,输出的时候是输出他的字符串表示,这里这个HTMLParagraphElement类型默认的toString()方法返回的就是"[object HTMLParagraphElement]"
2016-07-20
<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-20
最新回答 / 任逍遥0123
一般来说,放在哪里都可以。但是java的执行顺序是从上到下的,代码要先读到这个变量它才会被调用,这个时候javascript就要放在这个变量的下方位置。
2016-07-20
最新回答 / 徐京乐
所有的编程语言在标点上都不支持中文标点,由于字符编码的原因,编译器会解析出不同的结果,我们使用的主流编译器都是外国人编写的。可以在代码中切换输入法观察,比如中文的逗号和英文的逗号会有明显的差别
2016-07-20
已采纳回答 / child童
form在html中代表表单,可向其中插入按钮。input type="button"代表插入一个按钮,value="点击我"为按钮名字,onclick="contxt()”为点击按钮后的响应事件,从而调用函数
2016-07-20
1 function contxt() //定义函数
{
alert("哈哈,调用函数了!");
}
contxt();
2 <input type="button" value="点击我" onclick="contxt()" />
{
alert("哈哈,调用函数了!");
}
contxt();
2 <input type="button" value="点击我" onclick="contxt()" />
2016-07-20