5/13 HTML 你選了什麼?
<html>
<head>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Task', 'Hours per Day'],
['Work', 11],
['Eat', 2],
['Commute', 2],
['Watch TV', 2],
['Sleep', 7]
]);
var options = {
title: 'My Daily Activities'
};
var chart = new google.visualization.PieChart(document.getElementById('piechart'));
chart.draw(data, options);
}
</script>
</head>
<body>
<form action="post.php" method="post" name="add" enctype="multipart/form-data" onSubmit="return check();" >
<h1>1、你選擇什麼?</h1>
<input name="v1" type="radio" value=1>A
<input name="v1" type="radio" value=2>B
<input name="v1" type="radio" value=3>C
</form>
<form action="post.php" method="post" name="add" enctype="multipart/form-data" onSubmit="return check();" >
<h1>2、你選了什麼?</h1>
<input name="v2" type="radio" value="1">A
<input name="v2" type="radio" value="2">B
<input name="v2" type="radio" value="3">C
</form>
<form action="post.php" method="post" name="add" enctype="multipart/form-data" onSubmit="return check();" >
<h1>3、你選了什麼?</h1>
<input name="v3" type="radio" value="1">A
<input name="v3" type="radio" value="2">B
<input name="v3" type="radio" value="3">C
</form>
<form action="post.php" method="post" name="add" enctype="multipart/form-data" onSubmit="return check();" >
<h1>4、你選了什麼?</h1>
<input name="v4" type="radio" value="1">A
<input name="v4" type="radio" value="2">B
<input name="v4" type="radio" value="3">C
</form>
<div id="piechart" style="width: 900px; height: 500px;"></div>
</body>
<input type="button" value="送出" onclick=("drawChart")/>
</html>
沒有留言:
張貼留言