<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="jquery-3.3.1.min.js"></script>
<script>
$(document).ready(function(){
$("#btn").click(function(){
$("#list").show();
});
});
</script>
</head>
<body>
<button id="btn" title="click here to show result">result</button>
<ol id="list" style="display:none">
<li>physic</li>
<li>chemistry</li>
<li>math</li>
<li>biology</li>
<li>computer</li>
<li>general science</li>
</ol>
</body>
</html>
Sunday, 3 February 2019
jQuery Click event
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="jquery-3.3.1.min.js"></script>
<script>
$(document).ready(function(){
$("#btn").click(function(){
$("#list").show();
});
});
</script>
</head>
<body>
<button id="btn" title="click here to show result">result</button>
<ol id="list" style="display:none">
<li>physic</li>
<li>chemistry</li>
<li>math</li>
<li>biology</li>
<li>computer</li>
<li>general science</li>
</ol>
</body>
</html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="jquery-3.3.1.min.js"></script>
<script>
$(document).ready(function(){
$("#btn").click(function(){
$("#list").show();
});
});
</script>
</head>
<body>
<button id="btn" title="click here to show result">result</button>
<ol id="list" style="display:none">
<li>physic</li>
<li>chemistry</li>
<li>math</li>
<li>biology</li>
<li>computer</li>
<li>general science</li>
</ol>
</body>
</html>
jQuery Alert box
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="jquery-3.3.1.min.js"></script>
<script>
$(document).ready(function(){
$("#btn").click(function(){
alert("you clicked");
});
});
</script>
</head>
<body>
<button id="btn"> click me</button>
</body>
</html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="jquery-3.3.1.min.js"></script>
<script>
$(document).ready(function(){
$("#btn").click(function(){
alert("you clicked");
});
});
</script>
</head>
<body>
<button id="btn"> click me</button>
</body>
</html>
Subscribe to:
Comments (Atom)
jQuery Show and Hide
<html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script...