日期格式被划分,我得到完全不同的值
我有一些 javascript 应该带来一些值来更改链接,但问题是日期格式写为: dd/mm/year 因此日期先除以月,然后除以年:) 这是函数:
function show_sales(employee_id,start_date,finish_date)
{
var url_str = "#request.self#?fuseaction=objects2.popup_showsales_emp"
url_str = url_str + '&employee_id=' + employee_id;
url_str = url_str + '&start_date=' + start_date;
url_str = url_str + '&finish_date=' + finish_date;
AjaxPageLoad(url_str,'salesdiv_' + employee_id,1,'Yükleniyor');
}
as u可以看到我想获取开始日期和完成日期来更改链接,但它会计算值))所以我得到的不是:02/01/2012 0.0009940357852882703 :) 谢谢大家的帮助!
i have a little javascript that should bring some values to change the link, but the problem is that date format is written like: dd/mm/year thus the day is divided by month then by year :) here is the function:
function show_sales(employee_id,start_date,finish_date)
{
var url_str = "#request.self#?fuseaction=objects2.popup_showsales_emp"
url_str = url_str + '&employee_id=' + employee_id;
url_str = url_str + '&start_date=' + start_date;
url_str = url_str + '&finish_date=' + finish_date;
AjaxPageLoad(url_str,'salesdiv_' + employee_id,1,'Yükleniyor');
}
as u can see i want to get the start date and finish date to change the link, but instead it counts the value )) so instead of getting: 02/01/2012 i get: 0.0009940357852882703 :) thank you all for the help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我希望函数调用中存在问题
,确保日期格式为字符串
i hope there is a prob in function call
make sure that date is formatted as string
我不太确定我是否理解你的意思,但这可能会有所帮助:
I am not quite sure if I have understand you but this may help: