में चेक किए गए चेकबॉक्स को अपडेट नहीं किया गया है। मुझे जेएस द्वारा चेकबॉक्स की जांच करने में कोई समस्या है। जब मैंने जेएस द्वारा चेकबॉक्स चेक किया है तो यह प्रोग्राम में ऐसा लगता है कि यह चेक किया गया है लेकिन यूआई में यह अपडेट नहीं हुआ है।यूआई
अगर किसी को भी इस
<!DOCTYPE html>
<html>
<head>
<title>Check</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>
<script>
function getCheckedValue()
{
return ((document.getElementById("rock").checked));
}
function setCheckedValue(toBeChecked){
document.getElementById(toBeChecked).checked="checked";
alert((document.getElementById(toBeChecked).checked))
alert($('#'+toBeChecked).attr('checked'))
}
</script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>What kind/s of music do you listen to?</h1>
</div><!-- /header -->
<div data-role="content">
<input type="checkbox" class="music" name="music" id="rock" value="rock" >
<label for="rock">Rock</label>
<input type="button" value="Get" onclick="alert(getCheckedValue())">
<input type="button" value="Set" onclick="setCheckedValue('rock') ">
</div>
</div>
</body>
</html>
आपको अपने प्रश्न का एक स्वीकार्य जवाब मिला है, तो [कृपया के रूप में स्वीकार जवाब निशान।] (Http://meta.stackexchange.com/a/5235/171858) –