2018-02-11 1st

shenye1972

License: MIT License

Fork
0
Fav
0
View
152
  • Play

Fullscreen

Smart Phone

  • Readme
  • JavaScript 38 lines
  • HTML 47 lines
  • CSS 0 lines
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset=utf-8">
<title>radiobutton3</title>
<script type="text/javascript" >
var RadioGroup1=new array[ "Radio1", "Radio2", "Radio3" ];
Radio1.push(check1);
Radio2.push(check2);
Radio3.push(check3);
for (var i=0;i<radBtn.length;++i;){

]

function onRadioButtonChange() {
check1 = document.form1.Radio1.checked;
check2 = document.form1.Radio2.checked;
check3 = document.form1.Radio3.checked;

target = document.getElementById("output");

if (check1 == true) {
target.innerHTML = "mmで計算されています。<br/>";
}
else if (check2 == true) {
target.innerHTML = "cmで計算されています。<br/>";
}
else if (check3 == true) {
target.innerHTML = "Mで計算されています。<br/>";
}
}
</script>
</head>
<body>
<form name="form1" target="_self">
<input id="Radio1" name="RadioGroup1" type="radio" onchange="onRadioButtonChange();" />
<label for="Radio1">mm</label><br/>
<input id="Radio2" name="RadioGroup1" type="radio" onchange="onRadioButtonChange();" />
<label for="Radio2">cm</label><br />
<input id="Radio3" name="RadioGroup1" type="radio" onchange="onRadioButtonChange();" />
<label for="Radio3">M</label><br />
</form>
<div id="output"></div>
</body>
</html>
  • 2018-02-11 1st
  • 2018-02-11 1st

play

Complete!

Description What kind of game?

Control Device

jsdo.it websocket controller

Mouse

keyboard

smartphone

Fullscreen

shenye1972

Author

HTML/Javascript興味からどれだけのものが出来るかチャレンジしてます!

Default Panel

Size

  • Width: px
  • Height: px

code

QR Code

Discussion

Questions on this code?

Tags