How to append some (text/img) after some html element using jquery
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script type="text/javascript" >
$(document).ready(function(){
var i=0;
$("#sub").on("click",function(){
$( "#1" ).append("Test "+i+" ... ");
i++;
});
});
</script>
</head>
<body>
<div id="1">This is my test...</div>
<button type="button" id="sub">Append</button>
</form>
</body>
</html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script type="text/javascript" >
$(document).ready(function(){
var i=0;
$("#sub").on("click",function(){
$( "#1" ).append("Test "+i+" ... ");
i++;
});
});
</script>
</head>
<body>
<div id="1">This is my test...</div>
<button type="button" id="sub">Append</button>
</form>
</body>
</html>
No comments:
Post a Comment