여기에 (두 기능이있다.)이 플러그인에 대한 문서의 http://tkyk.github.com/jquery-history-plugin/#documentation이 함수에서 물음표는 무엇을 의미합니까?
$(document).ready(function() {
function load(num) {
$('#content').load(num +".html");
}
$.history.init(function(url) {
load(url == "" ? "1" : url);
});
$('#ajax-links a').live('click', function(e) {
var url = $(this).attr('href');
url = url.replace(/^.*#/, '');
$.history.load(url);
return false;
});
});
다음은 HTML입니다 :
<body>
<h1>jQuery History Plugin Ajax Sample</h1>
<div id="ajax-links">
<ul>
<li><a href="#1">load 1.html</a></li>
<li><a href="#2">load 2.html</a></li>
<li><a href="#3">load 3.html</a></li>
</ul>
<div id="content"></div>
<hr />
</div>
<p>[<a href="../">All samples</a>] [<a href="http://github.com/tkyk/jquery-history-plugin">Project home</a>]</p>
</body>
가능한 중복 항목 : http://stackoverflow.com/questions/1771786/question-mark-in-javascript http://stackoverflow.com/questions/1688337/javascript-if-alternative http://stackoverflow.com/ 질문/3322704/javascript-notation http://stackoverflow.com/questions/4278232/javascript-explanation-of-and http://stackoverflow.com/questions/6813840/what-does-this-javascript-code-do – JJJ
이것은 자바 스크립트의 기본 삼항 연산자입니다. http://msdn.microsoft.com/en-us/library/be21c7hw(v=vs.94).aspx – Devjosh
[Javascript Ternary operator] (http : // stackoverflow. com/q/1788917/693207) –