내가 asp.net 응용 프로그램에서 마스터 페이지자바 스크립트 런타임 오류 : 속성 또는 메서드를 지원하지 않습니다 개체
<script type="text/javascript">
if (window.location.pathname.contains('Page1.aspx')) {
var js = document.createElement("script");
js.type = "text/javascript";
js.src = 'http://code.jquery.com/jquery-1.8.3.js';
}
if (window.location.pathname.contains('Page2.aspx')) {
var js = document.createElement("script");
js.type = "text/javascript";
js.src = 'http://code.jquery.com/jquery-1.9.1.js';
}
</script>
에 아래의 코드를 작성했습니다 '포함', 나는 3 페이지 PAGE1, 페이지 2, PAGE3이있는 동일한 마스터 페이지에 상속됩니다. 페이지 3에 액세스하려고하면 오류가 표시됩니다. "JavaScript 런타임 오류 : 객체가 '포함하는 속성 또는 메서드'를 지원하지 않습니다."
왜 두 페이지에서 서로 다른 버전의 jQuery를 사용하고 있습니까? –
마스터 페이지에서 jquery 충돌로 인해. – Billy