JOJ
踏踏实实做人,认认真真做事!放纵自己就是毁灭自己!

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!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 runat="server">
    <title>MyTest</title>
    <script type="text/javascript" src="js/jquery-1.3.min.js"></script>
    <script type="text/javascript">
         //$(function(){$("p").css("color","red");$("p").click(function(){alert("df");});});
         $(function(){
            //取标签    设置样式属性键:值 形式
            $("p").eq(0).css({"color":"blue","background":"blue","background-color":"lightBlue"})
            //id前加#
            $("#tt2").css({"color":"red","background":"blue","background-color":"lightBlue"})
           
            $("p").click(function(){alert($("p").css("color"));})
            }
         );
         function tt(){
            var val = $("p").css("color");
            alert(val);
         }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <p id="tt">good</p>
        <p id="tt2">luck</p>
        <input type="button" value="test" />
    </div>
    </form>
</body>
</html>

“七”乐无穷,尽在新浪新版博客,快来体验啊~~~请点击进入~

posted on 2010-03-29 23:49  JoinJ  阅读(189)  评论(0编辑  收藏  举报