rated by 0 users
This post has 2 Replies | 1 Follower

Top 50 Contributor
Male
Posts 15
Nguyễn Anh Đức Posted: 06-29-2010 5:13 PM

Mọi người cho mình hỏi đoạn javascript sau mình debug trên visual không chạy ( mình đã đặt trust size ở IE và enable script). Khi mình viết lại trên notepad thì chạy được. Không biết mình lỗi ở đâu:

 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="JavaScriptControl._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></title>

 

 

  <style type="text/css" >

  p { color:red; margin:5px; cursor:pointer; }

  p.hilite { background: yellow; }

  </style>

 

 

   <script type="text/javascript" src="Script/jquery-1.4.1.js">

        $("p").hover(function() {

            $(this).addClass("hilite");

        }, function() {

            $(this).removeClass("hilite");

        });

    </script>

 

</head>

<body>

    <form runat="server">

    <div>

    <p>First Paragraph</p>

    <p>Second Paragraph</p>

    <p>Yet one more Paragraph</p>

    </div>

 

</form>

</body>

</html>

Bác nào giúp em với

 

 

Top 50 Contributor
Posts 13

Muốn biết lỗi do đâu thì phải "debug" chứ  :)

Cài đặt "fire bug" hay "IE Developer tool bar về  rồi step by step mà check

Top 50 Contributor
Male
Posts 15

Hi !

Cảm ơn anh Hải, em đã sửa được rồi.

Page 1 of 1 (3 items) | RSS