Thursday, January 18, 2018

Drop Down JQuery Dynamic

<!DOCTYPE html>
<html>
<head>
<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

Recent Post

Databricks Delta table merge Example

here's some sample code that demonstrates a merge operation on a Delta table using PySpark:   from pyspark.sql import SparkSession # cre...