地址中的field=[object%20HTMLInputElement]是什么意思?
源代码如下
var returnValue="";
function getDate(field,strBil){
var url ="js/CalendarCn.htm?field=" + field ;
var calWin = window.showModalDialog (url,window,"dialogHeight: 250px; dialogWidth: 430px; center: Yes; help: No; resizable: No; status: No");
field.value=returnValue;
}
field为空字符串""呀
var sData = dialogArguments;
sData.returnValue=format(dateFormat, y, m, d);
self.close();
function format( f, y, m, d ) {
var ds = replace( f, "yyyy", y );
return ds;
}
function replace( str, o, n ) {
var pos = str.indexOf( o );
if (pos == -1) return str;
return str.substr( 0, pos ) + n + str.substr( pos + o.length );
}
returnValue的值为字符串不为html对象呀,为什么返回的是html对象?
field 就是字段、属性的意思,你这里是一个参数名称呗
[object%20HTMLInputElement] %20是地址栏重新编码后的空格。这个整体就是一个js获取的html对象。
alert(getElementById("div1")); 这样子弹出的就是[object HTMLInputElement] 这样的内容。
你这个应该是将一个文本框对象 赋值个日历控件作为初始化吧? 你看看getDate(field,strBil)在哪里调用了。
本文解释了JavaScript中HTMLInputElement对象的含义及其在URL中的编码形式。通过示例代码展示了如何使用此对象与日历控件交互。
828

被折叠的 条评论
为什么被折叠?



