已采纳回答 / yes居然被占用
那个显示的方法名是敏感词,你换个名称就行了,方法名尽量不要使用敏感词function hidden() { var H = document.getElementById("txt"); H.style.display = "none"; } function op() { var P = document.getElementById("txt"); P.style.display = "block"; }
2016-01-11
已采纳回答 / HrOice
意思就是返回的true和false 是布尔类型的,嗯,叫你在以后注意下的意思,因为 'true'==true 返回的false ,虽然与问题没有关系,仅仅是给你提示注意一下而已。还有那些代码我感觉没有问题的啊
2016-01-10
最新回答 / 谢康
<...code...><...code...><...code...><...code...><...code...><...code...><...code...><...code...><...code...>
2016-01-10
最新回答 / 学海无涯乐悠悠
//定义"显示内容"的函数function divDis(){ divColor.style.display="block";找到了,少了一个括号,习惯不好
2016-01-10
最新回答 / 珍珠lv
object.removeAttribute("style");如下例子:function del(){ var change=confirm("你确定要取消全部设置吗?"); if(change==true){ var e1=document.getElementById("con"); var e2=document.getElementById("txt"); e1.removeAttribute("style"); e2.remo...
2016-01-10
慕课网的右侧实时效果区,改成 onchange() 类型的,也就是说 只要代码编辑区有所更改,就自动执行代码,这个创意非常不错!
只想说,赞一个!
赞,慕课女神!
只想说,赞一个!
赞,慕课女神!
2016-01-10
调用函数有两种方法,一种是直接在function contxt() //定义函数
{
alert("哈哈,调用函数了!");
}后加定义的函数名,
第二种是在input中以onclick="函数名()"调用;
{
alert("哈哈,调用函数了!");
}后加定义的函数名,
第二种是在input中以onclick="函数名()"调用;
2016-01-09
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
var mystr="我喜欢你";
document.write(mystr+"zhuli");
</script>
<html>
<head>
<script type="text/javascript">
var mystr="我喜欢你";
document.write(mystr+"zhuli");
</script>
2016-01-09
function openWindow()
{
var kk=confirm("");
if(kk==true)
{
var JJ=prompt("are you sure open it?","http://www.imooc.com");
window.open(JJ,'_balnk','width=400px,height=500px,menubar=no,toolbar=no');
}
}
{
var kk=confirm("");
if(kk==true)
{
var JJ=prompt("are you sure open it?","http://www.imooc.com");
window.open(JJ,'_balnk','width=400px,height=500px,menubar=no,toolbar=no');
}
}