/js/lib/Socket.IO-node/support/expresso/deps/jscoverage/doc/example-inverted/script.js
JavaScript | 20 lines | 20 code | 0 blank | 0 comment | 7 complexity | e6dc378a03e76f7571c04e2a3570c62a MD5 | raw file
1function go(element) { 2 var message; 3 if (element.id === 'radio1') { 4 message = 'You selected the number 1.'; 5 } 6 else if (element.id === 'radio2') { 7 message = 'You selected the number 2.'; 8 } 9 else if (element.id === 'radio3') { 10 message = 'You selected the number 3.'; 11 } 12 else if (element.id === 'radio4') { 13 message = 'You selected the number 4.'; 14 } 15 var div = document.getElementById('request'); 16 div.className = 'black'; 17 div = document.getElementById('result'); 18 div.innerHTML = '<p>' + message + '</p>'; 19 div.innerHTML += '<p>If you are running the instrumented version of this program, you can click the "Coverage report" button to view a coverage report.</p>'; 20}