clearing text box value
clearing text box value
i want to clear the default value of textbox,
i wrote this code,
please tell me whats wrong with this?
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>
<script type="text/javascript" src="jquery-1.3.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(':reset').click(function(){
$(':text').val('');
});
});
</script>
</head>
<body>
<form action="som.php" method="post">
<input type="text" value="defult" />
<input type="reset" value="clear" />
</form>
</body>
</html>