faqts : Computers : Programming : Languages : JavaScript : Event handling

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 3 people (67%) answered Yes
Recently 2 of 3 people (67%) answered Yes

Entry

Is it possible that when I click on a link, the table in the current document gets borders?

Feb 10th, 2003 05:40
Klaus Bolwin, shantanu oak, Fred Drake,


<html>
<head>
<title></title>
</head>
<body>
<table style="border:0px solid red;" id="tab">
<tr>
 <td>1</td>
 <td>2</td>
 <td>3</td>
 <td>4</td>
</tr>
<tr>
 <td>5</td>
 <td>6</td>
 <td>7</td>
 <td>8</td>
</tr>
<tr>
 <td>9</td>
 <td>10</td>
 <td>11</td>
 <td>12 </td>
</tr>
<tr>
 <td>13 </td>
 <td>14</td>
 <td>15</td>
 <td>16</td>
</tr>
</table>
<a href="#"
onmousedown="document.getElementById('tab').style.borderWidth = 3+'px';"
onmouseup="document.getElementById('tab').style.borderWidth = 0+'px';">
link</a>
</body>
</html>