First, indent your code:
function setContent() {
if (document.complianceformAA.compliance_AA.checked == true) {
document.getElementById('ComplianceSummary').innerHTML="A compliance concern is found for Key Element I-A.";
} else {
document.getElementById('ComplianceSummary').innerHTML="Key Element I-A is met.";
}
}
Second, you don't get elements like that.
You get it through one of this methods:
getElementById('id')
This gets the element based on ID. For example, this:
document.getElementById('checkbox');
Would get this:
<input type="checkbox" id="checkbox"></input>
getElementsByTagName();
This gets all elements with the same tag.
document.getElementsByTagName('button');
could return
HTMLCollection [ <button>, <button>, <button>, <button> ]
with this HTML code:
<div id="buttons">
<button>
<button>
<button>
<button>
</div>
getElementsByClassName()
This returns all elements with a certain class name. For example:
document.getElementsByClassName('a')
could return
HTMLCollection [ <button.a>, <button.a>, <button.a>, <button.a> ]
With this code
<div id="buttons">
<button class="a">
<button class="a">
<button class="a">
<button class="a">
</div>
getElementsByName()
This gets all elements with the name specified. For example:
document.getElementsByName('hi');
could return
NodeList [ <button.className> <button.className> ]
with this HTML code:
<div id="buttons">
<button name="hi" class="className">
<button name="hi" class="className">
</div>
So what you want for your javascript is this:
function setContent() {
checkBox = document.getElementById('compliance_AA');
if (checkBox.checked) {
document.getElementById('ComplianceSummary').innerHTML = "A compliance concern is found for Key Element I-A.";
} else {
document.getElementById('ComplianceSummary').innerHTML = "Key Element I-A is met.";
}
}
Here's an example:
function setContent() {
checkBox = document.getElementById('compliance_AA');
if (checkBox.checked) {
document.getElementById('ComplianceSummary').innerHTML = "A compliance concern is found for Key Element I-A.";
} else {
document.getElementById('ComplianceSummary').innerHTML = "Key Element I-A is met.";
}
}
<div id="Concerns">
<form id="complianceformAA">
<input type="checkbox" id="compliance_AA">
<label for="compliance_AA">Compliance Concern?</label>
</form>
</div>
<button onclick="setContent();">Generate Summary</button>
<div id="ComplianceSummary"></div>