我有一个包含多个Updatepannel的页面,这些页面都是可见的false,当你点击一个按钮时我会一个接一个地显示它们。
我想使用bootstrap datetime picker但我的问题是脚本没有符文浏览器。


 < script type =“text / javascript”>
 $(function(){
 $('#datetimepicker1')。datetimepicker();
});
 < / script>



 如果我在控制台中运行它,则一切正常。
有关如何强制执行此操作的任何想法运行脚本?


按要求:


 $(function(){&#xA ; $('#datetimepicker1')。datetimepicker();
});
 init [1] 0:documentcontext:documentURL:“http:// localhost:52261 / Dashboard.aspx”activeElement:bodyalinkColor :“”all:HTMLAllCollection [520]锚点:HTMLCollection [0] applets:HTMLCollection [0] baseURI:“http:// localhost:52261 / Dashboard.aspx”bgColor:“”body:bodycharacterSet:“UTF-8”charset :“UTF-8”childElementCount:1childNodes:NodeList [2] children:HTMLCollection [1] compatMode:“CSS1Compat”contentType:“text / html”cookie:“”cphNavigation_imgProfile:undefinedcurrentScript:nulldefaultView:WindowdesignMode:“off”dir:“ “doctype:<!DOCTYPE html> documentElement:htmldocumentURI:”http:// localhost:52261 / Dashboard.aspx“domain:”localhost“embeds:HTMLCollection [0] fgColor:”“firstChild:<!DOCTYPE html> firstElemen tChild:htmlfonts:FontFaceSetforms:HTMLCollection [1] head:headhidden:falseimages:HTMLCollection [1] implementation:DOMImplementationinputEncoding:“UTF-8”isConnected:truejQuery19107336506808681962:1lastChild:htmllastElementChild:htmllastModified:“02/17/2017 11:51:13 “linkColor:”“links:HTMLCollection [68] location:LocationnextSibling:nullnodeName:”#document“nodeType:9nodeValue:nullonabort:nullonauxclick:nullonbeforecopy:nullonbeforecut:nullonbeforepaste:nullonblur:nulloncancel:nulloncanplay:nulloncanplaythrough:nullonchange:nullonclick:nullonclose:nulloncontextmenu :nulloncopy:nulloncuechange:nulloncut:nullondblclick:nullondrag:nullondragend:nullondragenter:nullondragleave:nullondragover:nullondragstart:nullondrop:nullondurationchange:nullonemptied:nullonended:nullonerror:nullonfocus:nulloninput:nulloninvalid:nullonkeydown:nullonkeypress:nullonkeyup:nullonload:nullonloadeddata:nullonloadedmetadata:nullonloadstart :nullonmousedown:nullonmo useenter:nullonmouseleave:nullonmousemove:nullonmouseout:nullonmouseover:nullonmouseup:nullonmousewheel:nullonpaste:nullonpause:nullonplay:nullonplaying:nullonpointercancel:nullonpointerdown:nullonpointerenter:nullonpointerleave:nullonpointerlockchange:nullonpointerlockerror:nullonpointermove:nullonpointerout:nullonpointerover:nullonpointerup:nullonprogress:nullonratechange:nullonreadystatechange:nullonreset: nullonresize:nullonscroll:nullonsearch:nullonseeked:nullonseeking:nullonselect:nullonselectionchange:nullonselectstart:nullonshow:nullonstalled:nullonsubmit:nullonsuspend:nullontimeupdate:nullontoggle:nullonvolumechange:nullonwaiting:nullonwebkitfullscreenchange:nullonwebkitfullscreenerror:nullonwheel:nullorigin:“http:// localhost:52261”ownerDocument :nullparentElement:nullparentNode:nullplugins:HTMLCollection [0] pointerLockElement:nullpreferredStylesheetSet:nullpreviousSibling:nullreadyState:“complete”referrer:“http:// localhost:52 261 / Default.aspx“rootElement:nullscripts:HTMLCollection [18] scrollingElement:bodyselectedStylesheetSet:nullstyleSheets:StyleSheetListtextContent:nulltitle:”Credit Hire Portal“visibilityState:”visible“vlinkColor:”“webkitCurrentFullScreenElement:nullwebkitFullscreenElement:nullwebkitFullscreenEnabled:truewebkitHidden:falsewebkitIsFullScreen:falsewebkitVisibilityState: “visible”xmlEncoding:nullxmlStandalone:falsexmlVersion:null__proto __:HTMLDocumentlength:1__proto__:Object [0]



 Update 1
在master中页面我有2个contentplaceholders,一个用于导航栏,第二个用于多步表单(在这里我有datetimepicker)。
如果我把datetimepicker放在导航内容上,一切正常... :(

答案 0 :(得分:0)
您需要在所有.js(库文件)的所有声明下确保您的脚本。
实施例
# minikube start
Starting local Kubernetes cluster...
E0217 15:00:35.395801 3869 start.go:107] Error starting host: Error creating host: Error with pre-create check: "This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory".
Retrying.
E0217 15:00:35.396019 3869 start.go:113] Error starting host: Error creating host: Error with pre-create check: "This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory"
================================================================================
An error has occurred. Would you like to opt in to sending anonymized crash
information to minikube to help prevent future errors?
To opt out of these messages, run the command:
minikube config set WantReportErrorPrompt false
================================================================================
Please enter your response [Y/n]:
您也可以在浏览器的控制台窗口中看到脚本的错误。 的离。在Chrome浏览器中按F12。然后单击控制台。它将显示您的脚本错误。