问题描述
function show_calendar(){
var gNow = new Date();
var ReturnItem = arguments [0];
if( arguments [1] == null)
inMonth = new String(gNow.getMonth()+ 1);
else
inMonth = arguments [1];
if(arguments [2] == null)
inDay = new String(gNow.getDate());
否则
inDay = arguments [2];
if(arguments [3] == null)
inYear = new String(gNow.getYear ());
else
inYear = arguments [3];
var scpHeader =script;
var scpLanguage =JavaScript;
var scpDash = - ;
var winProps =toolbar = no,location = no,direction = no,status = no ,menubar = no,scrollbars = no,resizable = no,width = 165,height = 165,left =+ StartLeft +,top =+ StartTop;
wCal = window.open('','winCalendar',winProps);
wCal.opener = self;
wCal.document.writeln('< html> < META HTTP-EQUI V =Content-Typecontent =text / html; charset = iso-8859-1>< META HTTP-EQUIV =Expirescontent =<%= Now%>>< TITLE>选择日期< / TITLE>');
wCal.document.writeln('< BODY Style =background-repeat:no-repeat; background-position:center;bgcolor =whitebackground =/ graphics / sbc_color_med.gifbgproperties = fixed topmargin = 0 leftmargin = 0>');
wCal.document.writeln('');
wCal.document.writeln('<'+ scpHeader +'language ='+ scpLanguage +'FOR =Calendar1EVENT =Click()>');
wCal.document.writeln('<!'+ scpDash + scpDash);
wCal.document.writeln('ReturnDate = this.month +/+ this.day + /\"+this.year;');
wCal.document.writeln('self.opener.document。'+ ReturnItem +'。value = ReturnDate;');
wCal.document.writeln('self.opener.document。'+ ReturnItem +'。select();');
wCal.document.writeln(' self.opener.document。'+ ReturnItem +'。focus();');
wCal.document.writeln('self.close();');
wCal.document.writeln('\ / \ /'+ scpDash + scpDash +'>');
wCal.document.writeln('< \ /'+ scpHeader + '>');
wCal.document.writeln('
function show_calendar() {
var gNow = new Date();
var ReturnItem = arguments[0];
if (arguments[1] == null)
inMonth = new String(gNow.getMonth()+1);
else
inMonth = arguments[1];
if (arguments[2] == null)
inDay = new String(gNow.getDate());
else
inDay = arguments[2];
if (arguments[3] == null)
inYear = new String(gNow.getYear());
else
inYear = arguments[3];
var scpHeader = "script";
var scpLanguage = "JavaScript";
var scpDash = "-";
var winProps = "toolbar=no,location=no,direction=no,status=no,menubar=no,scrollbars=no,resizable=no,width=165,height=165,left=" + StartLeft + ",top=" + StartTop;
wCal = window.open('','winCalendar',winProps);
wCal.opener = self;
wCal.document.writeln('<html><META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1"><META HTTP-EQUIV="Expires" content="<%=Now%>"><TITLE>Select Date</TITLE>');
wCal.document.writeln('<BODY Style="background-repeat:no-repeat;background-position:center;" bgcolor="white" background="/graphics/sbc_color_med.gif" bgproperties=fixed topmargin=0 leftmargin=0>');
wCal.document.writeln('');
wCal.document.writeln('<' + scpHeader + ' language="' + scpLanguage + '" FOR="Calendar1" EVENT="Click()">');
wCal.document.writeln('<!' + scpDash + scpDash);
wCal.document.writeln('ReturnDate = this.month+"/"+this.day+"/"+this.year;');
wCal.document.writeln('self.opener.document.' + ReturnItem + '.value = ReturnDate;');
wCal.document.writeln(' self.opener.document.' + ReturnItem + '.select();');
wCal.document.writeln(' self.opener.document.' + ReturnItem + '.focus();');
wCal.document.writeln('self.close();');
wCal.document.writeln('\/\/' + scpDash + scpDash + '>');
wCal.document.writeln('<\/' + scpHeader + '>');
wCal.document.writeln('
推荐答案
这篇关于日期选择器在Internet Explorer 11中不起作用.javascript用于日期选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!