简体   繁体   English

在JavaScript + asp.net上

[英]On JavaScript + asp.net

In my asp.net page i have java script calendar,on which i want the selected date & then that date has to passed to the code behind's method. 在我的asp.net页面上,我有Java脚本日历,在该日历上我希望选择日期,然后将该日期传递给背后方法的代码。 How should it be done??? 应该怎么做?

The JavaScript actually is evaluated at the same time as HTML. 实际上,JavaScript与HTML同时评估。 So you can just write the JavaScript with ASP. 因此,您可以使用ASP编写JavaScript。 You just shouldn't forget to put ' and to escape if you right a string and so on. 您只是不应该忘记放'和如果您正确的字符串等逃脱。

如果您的javascript日历将所选日期放入文本框或隐藏字段中,那么您应该能够在回发时访问此日期。

如果您想要选择的值,则需要JavaScript日历将日期写到表单内的输入框中,并将其作为回发的一部分发送回去。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM