-1

我有 java 脚本代码。但我想再添加一些东西。当我将鼠标拖到该日期上时,我想突出显示日期并向该日期添加消息。代码是

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>DatePicker</title>
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
   <script src="Js/JScript1.js" type="text/javascript"></script>
   <script src="Js/JScript2.js" type="text/javascript"></script>
  <link rel="stylesheet" href="/resources/demos/style.css" />
 <script>
   $(function () {
   $("#datepicker").datepicker({ minDate: 0 });
   //       $("#datepicker").datepicker({ minDate: -60, maxDate:0 });
   });
  </script>
 </head>
  <body>
   <form id="form1" runat="server">
   <div style="height: 220px">
   <div style="height: 191px; width: 1156px">
    <asp:TextBox ID="datepicker" runat="server"></asp:TextBox>
   </div>
   </div>
  </form>
 </body>
 </html>

我希望它应该在日期显示一条消息。例如:- 我们宣布 7 月 15 日是假期。当我将鼠标悬停在日历中的 15 日时,将显示一条小消息(例如:-今天是假期),当我移开鼠标时,该消息将显示。

4

1 回答 1

0

您应该处理要拖动光标的元素的悬停事件。在处理程序中,您可以根据需要更改其他元素的样式。

于 2013-07-12T10:47:22.573 回答