javascript日历无法在Firefox中正确显示 [英] javascript calender not displaying correctly in firefox
问题描述
我正在网站中使用javascript日历控件.
当我在IE中打开网站并启动JS日历时,效果很好.但是在Firefox中它无法正确显示.
在我的脚本中,我发现控件的顶部和左侧位置,需要在其中显示日历,如下所示.
do {
scwEle = scwEle.offsetParent;
offsetTop + = parseInt(scwEle.offsetTop,10);
offsetLeft + = parseInt(scwEle.offsetLeft,10);}
while(scwEle.tagName!=' BODY'&& scwEle.tagName!='HTML');
Hi,
I'm using javascript calender control in my website.
when i open my site in IE and launch the JS calender its shows fine. but in Firefox its not displaying correctly.
in my script i'm finding top and left possition of the control where we need to display the calender as follows.
do {
scwEle=scwEle.offsetParent;
offsetTop +=parseInt(scwEle.offsetTop, 10);
offsetLeft+=parseInt(scwEle.offsetLeft,10);}
while (scwEle.tagName != 'BODY' && scwEle.tagName != 'HTML');
当我从IE运行此脚本时,它显示对象的正确顶部和左侧位置.但是在Firefox中,对象"scwEle.offsetParent"被设置为返回null.
此处scwEle是页面中存在的文本框对象.
when i run this script from IE its displaying correct top and left posstion of the object. But in Firefox, the object "scwEle.offsetParent" returns as null.
here scwEle is the textbox object present in the page.
任何人都可以建议我为什么只在Firefox中发生这种情况.
Can any one suggest me why this is happening only in firefox.
预先感谢
致谢,
Ashok
Regards,
Ashok
推荐答案
Microsoft开发人员网络之一中span> >
Thank you for your post! I would suggest posting your question in one of the Microsoft Developer Network > Forums Home > JScript Forums > JScript Native located here: http://social.msdn.microsoft.com/Forums/en-US/jscript/threads.
这篇关于javascript日历无法在Firefox中正确显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!