| 1 | <html>
|
|---|
| 2 | <head>
|
|---|
| 3 | <script type="text/javascript">
|
|---|
| 4 | Object.prototype.methodExists = function(methodName) {
|
|---|
| 5 | window.defaultStatus+= methodName.target.name + ":methodExists,";
|
|---|
| 6 |
|
|---|
| 7 | return (typeof(this[methodName]) == "function");
|
|---|
| 8 | };
|
|---|
| 9 | </script>
|
|---|
| 10 |
|
|---|
| 11 | <script type="text/javascript" src="jquery.js"></script>
|
|---|
| 12 | </head>
|
|---|
| 13 |
|
|---|
| 14 | <body>
|
|---|
| 15 | <form action="javascript://">
|
|---|
| 16 | <p>
|
|---|
| 17 | abc: <input type="text" name="abc" /><br />
|
|---|
| 18 | xyz: <input type="text" name="xyz" />
|
|---|
| 19 | </p>
|
|---|
| 20 | </form>
|
|---|
| 21 |
|
|---|
| 22 | <script type="text/javascript">
|
|---|
| 23 | $(document.forms[0].abc).bind(
|
|---|
| 24 | "focus",
|
|---|
| 25 | function(e) {
|
|---|
| 26 | window.defaultStatus+= e.target.name + ":" + e.type + ",";
|
|---|
| 27 | }
|
|---|
| 28 | );
|
|---|
| 29 | </script>
|
|---|
| 30 | </body>
|
|---|
| 31 | </html> |
|---|