喜悦国际村 
» 游客:  注册 | 登录 | 搜索 | 统计 | 帮助

RSS 订阅当前论坛  

喜悦证交所已经关闭

上一主题 下一主题
     
标题: [问题] ``救命啊!!!  
 
wjhome
注册会员
Rank: 2



UID 79424
精华 0
积分 151
帖子 81
金钱 151 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2006-9-2
状态 离线
[广告]: q m
``救命啊!!!



<html>
        <head>
                <title>Test</title>
                <script language='javascript'>
                        function c()
                        {
                                this.box = document.createElement('div');
                                this.box.className = 'box';
                                this.box.onclick = cc;
                                this.box.modObj = this;
                                var b = document.getElementsByTagName('body')[0];
                                b.appendChild(this.box);
                        }
                        function cc()
                        {
                                this.modObj.box.style.display = 'none';
                        }
                </script>
            <style type="text/css">
<!--
.box {
        background-color: #DEEEFE;
        height: 100px;
        width: 100px;
        border: 1px dashed #0066FF;
}
-->
        </style>
</head>
        <body>
        <input type='button' onclick='c()' value='Click'></input>
        </body>
</html>
生成后       每次只能隐藏一个     怎么能让点一个隐藏一个  看了半天就是看不出来 问题   
                   帮帮小弟 啊!  急啊!!!!
2006-12-12 09:23 AM#1
查看资料  发短消息  顶部
 
km3945 (km3945)
版主
Rank: 7Rank: 7Rank: 7
版主


UID 46538
精华 0
积分 1323
帖子 1287
金钱 1323 喜悦币
威望 0
人脉 0
阅读权限 100
注册 2004-11-8
状态 离线
[推荐阅读] 问一个关于FCKeditor换行配制的问题、!!


<?php
<html>
        <
head>
                <
title>Test</title>
                <
script language='javascript'>
                var 
i=0;
                        function 
c()
                        {
                                var 
box document.createElement('div');
                                var 
document.getElementsByTagName('body')[0];
                                
box.className 'box';
                                
box.innerText=i;
                                
box.onclick cc;
                                
b.appendChild(box);
                                
i++;
                        }
                        function 
cc()
                        {
                                
this.style.display 'none';
                        }
                
</script>
            <style type="text/css">
<!--
.box {
        background-color: #DEEEFE;
        height: 100px;
        width: 100px;
        border: 1px dashed #0066FF;
}
-->
        </style>
</head>
        <body>
        <input type='button' value='Click' onclick="c();"></input>
        </body>
</html>
?>




学会用下半身来思考!
2006-12-13 10:07 AM#2
查看资料  Blog  发短消息  QQ  顶部
     


  可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题 | 开通个人空间  


 




Powered by Discuz! 6.1.0  © 2001-2010 Comsenz Inc.
Processed in 0.024340 second(s), 6 queries

(冀ICP备05009913号) 管理员:sadly 邮箱/MSN: sadly@phpx.com QQ:824008(长隐) 清除 Cookies - - Archiver - WAP