나는 jquery tools' expose
기능 .I 내가 파이어 폭스와 chrome.But, 초점 효과 페이지를 시도 jquery-1.5.2.min.js
및 jquery.tools-1.2.5.toolbox.expose.min.js
jquerytools 문제가 Play에 노출됩니다! 튜토리얼
을 사용하고있는 텍스트 필드에 포커스를 가지고하는 데 사용되는 Play! framework
튜토리얼의 후 주석 부분을 시도했다 일어나지 않는다.
크롬의 검사 요소/리소스 탭을 사용하고 스크립트를 검사했을 때 이러한 오류가 발견되었습니다. 스크립트 탭에서
Uncaught SyntaxError: Unexpected token < jquery.tools.1.2.5.toolbox.min.js:1
Uncaught TypeError: Object [object Object] has no method 'expose' postcomment:94
(anonymous function) postcomment:94
d.extend._Deferred.f.resolveWithjquery-1.5.2.min.js:16
d.d.extend.readyjquery-1.5.2.min.js:16
d.c.addEventListener.yjquery-1.5.2.min.js:16
는 만
jquery-1.5.2.min.js
는
jquery.tools-1.2.5.toolbox.expose.min.js
파일을 표시하지만,하지 않습니다.
는 모질라 파이어 폭스가 사용 된 경우, 불을 지르고의 cosole 2 오류
를보고
는
syntax error
[Break on this error] <!DOCTYPE html>\n jquery.t...se.min.js (line 1)
$("form").expose is not a function
anonymous()postcomm...?postId=3 (line 97)
anonymous(Document postcomment?postId=3, [function()])jquery-1....2.min.js (line 16)
anonymous(Object name=a)jquery-1....2.min.js (line 16)
anonymous()jquery-1....2.min.js (line 16)
[Break on this error] $('form').expose({api: true, loadSpeed: 0}).load(); \npostcomm...?postId=3 (line 97
복사 오류는 여기
$("form").expose is not a function
http://localhost:9000/application/postcomment?postId=3
Line 97
을 제공합니다 파일이 추가 된 .js main.html의 부분이다
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>#{get 'title' /}</title>
<meta charset="${_response_encoding}">
<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/main.css'}">
#{get 'moreStyles' /}
<link rel="shortcut icon" type="image/png" href="@{'/public/images/favicon.png'}">
<script src="@{'/public/javascripts/jquery-1.5.2.min.js'}" ></script>
<script src="@{'/public/javascripts/jquery.tools-1.2.5.toolbox.expose.min.js'}"></script>
#{get 'moreScripts' /}
</head>
<body>
...
show.html 여기서 노출 기능은
입니다.#{extends 'main.html'/}
#{set title:post.title /}
...
<script type="text/javascript" charset="utf-8">
$(function() {
// Expose the form
$('form').click(function() {
$('form').expose({api: true}).load();
});
// If there is an error, focus to form
if($('form .error').size()) {
$('form').expose({api: true, loadSpeed: 0}).load();
$('form input[type=text]').get(0).focus();
}
});
</script>
누군가가 해결할 수 있도록 도와 줄 수 있습니까?
불을 지르고 콘솔은 '주는 구문 오류 '. jquery.tools-1.2.5.toolbox.expose.min.js 파일의 시작 부분에 의미가있는 것 같습니다. 클릭하십시오. 폼 내부에 오류가 발생하면 '$ ("form"). expose는 함수가 아닙니다. $ ('form'). expose ({api : true}). load(); \ n '...... 예, js 파일이 public/javascript에 실제로 있는지 확인했습니다. – jimgardener