`
阅读更多

<!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>
    <title>无标题页</title>
    <script type="text/javascript" src="jquery-1.4.2.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            $("#res").css("left",($(window).width()-$("#res").width())/2+"px");
            $("#res").css("top",($(window).height()-$("#res").height())/2+"px");
            $("#Text1").focus(function(){
                $("#res").fadeIn();
            })
            $("#Button1").click(function(){
                $("#Text1").val($("#result").html());
                $("#res").fadeOut();
            })
            $("input[type=checkbox]").click(function(){
                if($(this).attr("checked")==true)
                    $("#result").append($(this).val()+",");
                else
                     $("#result").html($("#result").html().replace($(this).val(),""));
            })
        })
    </script>
</head>
<body style="margin:0 auto; padding:0; text-align:center;">
    <input id="Text1" type="text" style="height:20px;border:1px solid #ccc;" />
    <div id="res" style="width:300px;height:300px;border:1px solid #ccc;z-index:10; background:yellow; FILTER:alpha(opacity=30);opacity=0.3;position:absolute; display:none;">
        <input id="Button1" type="button" value="确定" /><span id="result"></span><br />
        <input id="Checkbox1" type="checkbox" value="youku"/>youku
        <input id="Checkbox2" type="checkbox" value="tudou" />tudou
        <input id="Checkbox3" type="checkbox" value="baidu" />baidu
        <input id="Checkbox4" type="checkbox" value="google" />google
    </div>
</body>
</html>

<script type="text/javascript"><!-- google_ad_client = "pub-1985112462197986"; /* 新广告 336x280, 创建于 10-8-20 */ google_ad_slot = "6915893334"; google_ad_width = 336; google_ad_height = 280; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script><script type="text/javascript"><!-- google_ad_client = "pub-1985112462197986"; /* 336x280, 创建于 10-6-25 */ google_ad_slot = "9255958887"; google_ad_width = 336; google_ad_height = 280; //--> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics