jquery Gurus please tell me what is wrong with this code:
When I click submit nothing happens. What I expect to happen is that when I click submit the text in the text box should me copied into the div.
<!DOCUMENT html>
<html>
<head>
<title>jQuery Functionality</title>
<style type="text/css">
#display{
width: 250px;
height: 250px;
border: 1px dashed grey;
}
</style>
</head>
<body>
<script type="text/javascript">
$(function(){
$("#submit").click(function(){
var txt = $("#txtBox").val();
alert("txt = " + txt);
$("#display").html = txt;
})
});
</script>
<input id="txtBox" type="text"/>
<button id="submit">Submit</button>
<div id="display"></div>
</body>
</html>