<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
var values =
["Good","Bad","Worst"];
for(var i =0;i<values.length;i++){
$('#getScatteredGraphwithSelectedXAxis').append( '<option>' + values[i] +
'</option>' );
}
$('#getScatteredGraphwithSelectedXAxis')
.change(
function() {
alert($(this).val());
});
});
</script>
</head>
<body>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p id="test">This is another
paragraph.</p>
<select
id="getScatteredGraphwithSelectedXAxis">
<option>Select Value</option>
</select>
<button>Click me</button>
</body>
</html>
No comments:
Post a Comment