<script language="javascript" type="text/javascript" src="../Inc/calendar.js"/>

解决方案 »

  1.   

    src="../Inc/calendar.js"
    请自行确定路径和文件名是否正确在需要调用的控件上还需要写上 OnFocus="setday(this)"
      

  2.   

    路径是没错的,浏览网页,查看源文件,都有内容,但是网页上一片空白。我刚刚在控件上写上 OnFocus="setday(this)",还是空白。
      

  3.   

    你说的空白是指textbox获取到了焦点后,仍然是空白,没有弹出日历吗?尝试一下删除掉language="javascript"
      

  4.   

    是页面初始化的时候,整个页面一片空白。把 <script language="javascript" type="text/javascript" src="../Inc/calendar.js"/> 放到body后面去就好了,但是调用calendar(),却提示没有该方法。
      

  5.   

    哦,我写成 
    <script language="javascript" type="text/javascript" src="../Inc/calendar.js"></script>
    就可以了,但是调用calendar()却不行,明明代码里面写的“calendar() //主调函数”
      

  6.   

    贴calendar函数代码出来看看
    我的梅花雨控件就不是调用这个函数
      

  7.   

    function calendar() //主调函数
    {
        var e = window.event.srcElement;   writeIframe();
        var o = WebCalendar.calendar.style; WebCalendar.eventSrc = e;
     if (arguments.length == 0) WebCalendar.objExport = e;
        else WebCalendar.objExport = eval(arguments[0]);
        WebCalendar.iframe.tableWeek.style.cursor = WebCalendar.drag ? "move" : "default";
     var t = e.offsetTop,  h = e.clientHeight, l = e.offsetLeft, p = e.type;
     while (e = e.offsetParent){t += e.offsetTop; l += e.offsetLeft;}
        o.display = ""; WebCalendar.iframe.document.body.focus();
        var cw = WebCalendar.calendar.clientWidth, ch = WebCalendar.calendar.clientHeight;
        var dw = document.body.clientWidth, dl = document.body.scrollLeft, dt = document.body.scrollTop;
        
        if (document.body.clientHeight + dt - t - h >= ch) o.top = (p=="image")? t + h : t + h + 6;
        else o.top  = (t - dt < ch) ? ((p=="image")? t + h : t + h + 6) : t - ch;
        if (dw + dl - l >= cw) o.left = l; else o.left = (dw >= cw) ? dw - cw + dl : dl;
        if  (!WebCalendar.timeShow) WebCalendar.dateReg = /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/;
        else WebCalendar.dateReg = /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/;
        try{
            if (WebCalendar.objExport.value.trim() != ""){
                WebCalendar.dateStyle = WebCalendar.objExport.value.trim().match(WebCalendar.dateReg);
                if (WebCalendar.dateStyle == null)
                {
                    WebCalendar.thisYear   = new Date().getFullYear();
                    WebCalendar.thisMonth  = new Date().getMonth()+ 1;
                    WebCalendar.thisDay    = new Date().getDate();
                    alert("原文本框里的日期有错误!\n可能与你定义的显示时分秒有冲突!");
                    writeCalendar(); return false;
                }
                else
                {
                    WebCalendar.thisYear   = parseInt(WebCalendar.dateStyle[1], 10);
                    WebCalendar.thisMonth  = parseInt(WebCalendar.dateStyle[3], 10);
                    WebCalendar.thisDay    = parseInt(WebCalendar.dateStyle[4], 10);
                    WebCalendar.inputDate  = parseInt(WebCalendar.thisDay, 10) +"/"+ parseInt(WebCalendar.thisMonth, 10) +"/"+ 
                    parseInt(WebCalendar.thisYear, 10); writeCalendar();
                }
            }  else writeCalendar();
        }  catch(e){writeCalendar();}
    }
      

  8.   

    版本估计比较旧,不符合Web标准所致
      

  9.   

    <script language="javascript" type="text/javascript" src="../Inc/calendar.js" charset="GB2312">  试试这样写行不行
      

  10.   

    JS写在页面看看。或使用My97DatePicker
    <asp:TextBox id="txtStartTime" onfocus="new WdatePicker(this,null,false,'whyGreen')" runat="server" Width="120px"></asp:TextBox>
     
      

  11.   

    你在Page_Load 中添加 this.XXX.Attributes.Add("onfocus", "javascript:calendar()");XXX:你的文本框id试试
      

  12.   

    以前的版本,是要把页面里的
    <!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" >
    这些代码去掉才能好用!
      

  13.   

    <script language="javascript" type="text/javascript" src="../Inc/calendar.js"></script>
    改成这样试试