0

我如何获得第二个输入以使用日历插件以及第一个输入?

    <head> 
    <meta http-equiv="Content-Type".       content="text/html; charset=utf-8" /> 
    <title>jsDatePick Javascript example</title> 
    <link rel="stylesheet" type="text/    css"media="all" href="jsDatePick_ltr.min.css" /> 
    <script type="text/javascript" src="jsDatePick.min.1.3.js"></script> 

    <script type="text/javascript"> 
        window.onload = function(){ new JsDatePick({ useMode:2, target:"inputField", dateFormat:"%d-%m-%Y" }); };
     </script> 
    </head> 

    <body> 
    <input type="text" size="12" id="inputField" />
    <input type="text" size="12" id="inputField2" />
    </body> 

4

1 回答 1

0

在不了解该插件的情况下,我想您可以JsDatePick再次调用该插件,但要使用另一个目标:

window.onload = function() { 
    new JsDatePick({ useMode:2, target:"inputField", dateFormat:"%d-%m-%Y" }); 
    new JsDatePick({ useMode:2, target:"inputField2", dateFormat:"%d-%m-%Y" }); 
};
于 2013-10-01T06:17:01.513 回答