달성하고자하는 것 : 문서 (즉, 문서 1)를 클릭하면 사용자가 확인할 수 있도록 해당 문서의 오른쪽에있는 상자가 활성화됩니다. 그러나 현재 사용자가 문서 1을 클릭하면 모든 상자가 사용되도록 설정됩니다.단일 체크 상자 사용
예를 들어 문서 1을 사용하고 있었지만 각 문서 링크마다 이것을 원합니다. 누구든지 도와 줄 수 있습니까?
몇 가지 조사를했지만이 특정 것에 대한 수정 사항을 찾을 수 없습니다.
내 현재 코드 :
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td
{
border:1px solid black;
border-collapse:collapse;
}
</style>
<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("a").click(function() {
$("input").removeAttr("disabled");
});
});
</script>
</head>
<body>
<form method="post" action="mailto:@null">
<table style="width:500px">
<tr>
<td><a href="https://null" target="_d1">Document 1</a>
<td><input type="checkbox" name="name1" value="D1" disabled></td>
</tr>
<tr>
<td><a href="https://null" target="_d2">Document 2</a></td>
<td><input type="checkbox" name="name1" value="D2" disabled></td>
</tr>
<tr>
<td><a href="https://null" target="_d3">Document 3</a></td>
<td><input type="checkbox" name="name1" value="D3" disabled></td>
</tr>
<tr>
<td><a href="https://null" target="_d4">Document 4</a></td>
<td><input type="checkbox" name="name1" value="D4" disabled></td>
</tr>
<tr>
<td><a href="https://null" target="_d5">Document 5</a></td>
<td><input type="checkbox" name="name1" value="D5" disabled></td>
</tr>
<tr>
<td><a href="https://null" target="_d6">Document 6</a></td>
<td><input type="checkbox" name="policyAcknowledgement" value="D6" disabled></td>
</tr>
</table>
<input type="submit">
<input type="reset">
</form>
</script>
</body>
</html>
사이드 노트, 당신은 길 잃은 것 같다''의 끝에 당신의 페이지. – j08691
[JQuery - checkbox 사용/사용 중지] 가능한 복제본 (http://stackoverflow.com/questions/2330209/jquery-checkbox-enable-disable) – pennstatephil