问题描述
本人使用jquery和它的datePicker插件,打算做日期选择。本地文件打开,测试正确(file://这样的)但是我把相同的html放到aspx里用Response.Write输出,就会莫名奇妙多出一个<scriptid=__ie_init>,导致日期选择无法正常工作,不知何解?代码如下:<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/><title>后台管理系统</title><linkhref="styles/style.css"rel="stylesheet"type="text/css"/><linkhref="styles/datePicker.css"rel="stylesheet"type="text/css"/><scripttype="text/javascript"src="script/jquery-1.2.1.min.js"></script><scripttype="text/javascript"src="script/jquery.datePicker.js"></script><scripttype="text/javascript"src="script/jquery.dimensions.js"></script><scripttype="text/javascript"src="script/date.js"></script><scripttype="text/javascript"src="script/AddProduct.js"></script><scripttype="text/javascript"src="script/DateInit.js"></script></head><body><divid="top"><divid="top_logo"><imgsrc="images/logo.jpg"width="333"height="82"/></div><divid="top_opra"><divclass="div_row">您好,<spanstyle="color:#00f;">麦兜</span>!|<ahref="#">修改密码</a>|<ahref="#">注销</a>|<ahref="#">帮助</a></div></div></div><divid="content"><tablewidth="99%"border="0"cellspacing="0"cellpadding="0"><tr><tdwidth="236"align="left"valign="top"><!--Left--><divid="left"><divid="left_bt"></div><divclass="left_menu"><divclass="listboxbt">帐户管理</div><divclass="listbox"><ahref="#">我的订单</a></div><divclass="listbox"><ahref="#">我的订单</a></div><divclass="listbox"><ahref="#">我的订单</a></div><divclass="listbox"><ahref="#">我的订单</a></div><divclass="listboxbt">帐户管理</div><divclass="listbox"><ahref="#">我的订单</a></div><divclass="listbox"><ahref="#">我的订单</a></div><divclass="listbox"><ahref="#">我的订单</a></div><divclass="listbox"><ahref="#">我的订单</a></div><divclass="listboxbt">帐户管理</div><divclass="listbox"><ahref="#">我的订单</a></div><divclass="listbox"><ahref="#">我的订单</a></div><divclass="listbox"><ahref="#">我的订单</a></div><divclass="listbox"><ahref="#">我的订单</a></div><divclass="listboxbt">帐户管理</div><divclass="listbox"><ahref="#">我的订单</a></div><divclass="listbox"><ahref="#">我的订单</a></div><divclass="listbox"><ahref="#">我的订单</a></div><divclass="listbox"><ahref="#">我的订单</a></div></div><divclass="left_bottom"></div></div><!--LeftEnd--></td><tdalign="left"valign="top"><!--Right--><divclass="right"><divclass="right_bt"><imgsrc="images/add.gif"/>当前位置:<spanstyle="color:#096">我的订单</span></div><divclass="bottom"></div><!--表格数据--><divclass="new_ev_box"><formstyle="margin:0px;"action=""><divclass="row"><divclass="new_ev_left">名称:</div><divclass="new_ev_right"><inputname="Text1"type="text"class="inputt"/></div></div><divclass="row"><divclass="new_ev_left">市场价:</div><divclass="new_ev_right"><inputname="Text1"type="text"class="inputt"/></div></div><divclass="row"><divclass="new_ev_left">提交日期:</div><divclass="new_ev_right"><inputname="Text1"type="text"class="inputt"/></div></div><divclass="row"><divclass="new_ev_left">前台有效显示时间(开始):</div><divclass="new_ev_right"><inputname="Text1"type="text"class="inputtDatePicker"readonly="readonly"/></div></div><divclass="row"><divclass="new_ev_left">前台有效显示时间(结束):</div><divclass="new_ev_right"><inputname="Text1"type="text"class="inputtDatePicker"/></div></div><divclass="row"><divclass="new_ev_left">代表产品的图标文件名:</div><divclass="new_ev_right"><inputname="Text1"type="text"class="inputt"/></div></div><divclass="row"><divclass="new_ev_left">是否推荐产品:</div><divclass="new_ev_right"style="padding-left:8px;"><selectname="recommend"><optionvalue="yes">是</option><optionvalue="no">否</option></select></div></div><divclass="row"><divclass="new_ev_left2">产品详细描述</div><divclass="new_ev_right2"style="margin-bottom:20px;"><textareaname="TextArea1"cols="20"rows="6"style="border:1px#9DCCCCsolid;width:380px;color:#690;font-weight:bold;"onblur="this.style.backgroundColor=''"onfocus="this.style.backgroundColor='#F7fbfc'"></textarea></div></div><divclass="row"><divclass="new_ev_left">提交日期:</div><divclass="new_ev_right"><inputname="Text1"type="text"class="inputt"/></div></div><divclass="row"><divclass="new_ev_left">是否上架:</div><divclass="new_ev_right"><inputname="Text1"type="text"class="inputt"/></div></div><divclass="row"><divclass="new_ev_left">提交者:</div><divclass="new_ev_right"><inputname="Text1"type="text"class="inputt"/></div></div><divclass="row"><divclass="new_ev_left">折扣率:</div><divclass="new_ev_right"><inputname="Text1"type="text"class="inputt"/></div></div><divclass="row"><divclass="new_ev_left">库存数量:</div><divclass="new_ev_right"><inputname="Text1"type="text"class="inputt"/></div></div><divclass="row"><divclass="new_ev_right"style="background:#fafafa;height:50px;padding-left:190px;padding-top:20px;"><inputname="Text2"type="image"src="images/apl.jpg"style="width:100px;height:25px;border:0px;"/></div></div></form></div></div><!--RightEnd--></td></tr></table></div><divid="copyright">©2007OldkidsAllRightsReserved</div></body></html>
解决方案
解决方案二:
那个是jQuery初始化的脚本看看这个http://www.javaeye.com/topic/84683