我正在为这个挠头。
HTML:
<form>
<input name="changes" type="radio" value="2012-05-18T16%3A53%3A00.000000000000%2B0100">
<span>2012-05-18 16:53:00 +0100</span>
<input name="changes" type="radio" value="2012-05-29T16%3A51%3A00.000000000000%2B0100">
<span>2012-05-29 16:51:00 +0100</span>
<input name="changes" type="radio" value="2012-05-31T17%3A30%3A00.000000000000%2B0100">
<span>2012-05-31 17:30:00 +0100</span>
<input name="changes" type="radio" value="2012-06-01T16%3A30%3A00.000000000000%2B0100">
<input id="view-change" type="button" value="View">
</form>
在 Chrome JavaScript 控制台中:
var today = "2012-05-18T16%3A53%3A00.000000000000%2B0100"
$('input[value="2012-05-18T16%3A53%3A00.000000000000%2B0100"]') -> Finds object
$('input[value=today]') -> Nothing
嗯?为什么我不能使用 a 选择输入var
?
PS。我已经确认,jQuery.type(today)
=string