100求解---------套用母版后使用时间控件的问题。
如果是单独页面:----------------显示正常
<head id= "Head1 " runat= "server ">
<title> 日历控件 </title>
<script type= "text/javascript " src=popcalendar.js> </script>
</head>
<body>
<form id= "form1 " runat= "server ">
<div>
<asp:textbox id= "t1 " runat= "server " Width= "100px " ReadOnly= "True "> </asp:textbox>
<img id= "Image_blqx1 " style= "CURSOR: hand " onclick= "popUpCalendar(this,document.forms[0].t1, 'yyyy-mm-dd ') "src= "images/calendar.gif " /> </div>
</form>
</body>
-------------------------------
套用母版后:------------(提示错误)
在母版head添加
<script type= "text/javascript " src=popcalendar.js> </script>
在页面内添加
<img id= "Image_blqx1 " style= "CURSOR: hand " onclick= "popUpCalendar(this,document.forms[0].t1, 'yyyy-mm-dd ') " src= "images/calendar.gif " />
这个控件是在网上拉的。
地址为:http://tmsoft.lsxy.com/index.php?load=read&id=222
页面最下面的一个时间控件~
[解决办法]
<img id= "Image_blqx1 " style= "CURSOR: hand " onclick= "popUpCalendar(this,document.getElementById( ' <%=t1.ClientID%> '), 'yyyy-mm-dd ') " src= "images/calendar.gif " />
[解决办法]
如下,测试过,好用,把script 加到本页,同时用document.all. <%=t1.ClientID%> 取id
-------------------------------------
<asp:Content ID= "Content1 " ContentPlaceHolderID= "ContentPlaceHolder1 " Runat= "Server ">
<script type= "text/javascript " src= "popcalendar.js "> </script>
<div>
<asp:textbox id= "t1 " runat= "server " Width= "100px " ReadOnly= "True " CssClass= "edLine "> </asp:textbox>
<img id= "Image_blqx1 " style= "CURSOR: hand " onclick= "popUpCalendar(this,document.all. <%=t1.ClientID%> , 'yyyy-mm-dd ') "
src= "images/calendar.gif " /> </div>
</asp:Content>