PageRenderTime 43ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/js/lib/Socket.IO-node/support/expresso/deps/jscoverage/doc/example/script.js

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
JavaScript | 20 lines | 20 code | 0 blank | 0 comment | 7 complexity | a39b790c9831523d85afaac4927ca75f MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, MPL-2.0-no-copyleft-exception, BSD-3-Clause
  1. function 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 "Summary" tab to view a coverage report.</p>';
  20. }