<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javaScript">
$(document).ready(function() {
$('#second').click(function() {
alert("click");
$(this).attr('disabled','disabled');
});
});
function test(event){
event = event? event: window.event
var obj = event.srcElement ? event.srcElement:event.target;
alert(obj.tagName);
}
</script>
<body>
<form id="test" method="post">
<table>
<tr>
<td>ID:</td><td><input type="text" name="id" id="id" /></td></tr>
<tr>
<td>Name:</td><td><input type="text" name="name" /></td></td>
</tr>
<table>
<input type="button" id ="first" value="Test JS" onclick="test(event);" >
</form>
</body>
</html>
|