Skip to content

Commit fa4bd5d

Browse files
OnChange
1 parent 394a629 commit fa4bd5d

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

SJPv6/www/here-maps.js

+21-1
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,24 @@ function searchLocation(){
186186
onSuccess,
187187
onError
188188
);
189-
}
189+
}
190+
191+
192+
193+
function OnChange(id) {
194+
/*
195+
<label for="myCheck">Checkbox:</label>
196+
<input type="checkbox" id="myCheck" onchange="OnChange('myCheck')">
197+
198+
<p id="text" style="display:none">Checkbox is CHECKED!</p>
199+
200+
*/
201+
var checkBox = document.getElementById(id);
202+
var text = document.getElementById("text");
203+
if (checkBox.checked == true){
204+
text.style.display = "block";
205+
} else {
206+
text.style.display = "none";
207+
}
208+
}
209+

0 commit comments

Comments
 (0)