日期:2014-05-16 浏览次数:20438 次
<table> <tr> <td>提醒类型:</td><td> <input type="radio" name="sd_count" value="-1" checked>一次性提醒 <input type="radio" name="sd_count" value="0">重复提醒 </td> </tr> <tr> <td >提醒周期:</td> <td> <input type="text" name="sd_number" size="2" maxlength="2" value="1"></input> <input type="radio" name="sd_interval" value="ww" checked>周 <input type="radio" name="sd_interval" value="m">月 <input type="radio" name="sd_interval" value="yyyy">年 </select> </td> </tr> </table>
<!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> <title></title> <script src="http://code.jquery.com/jquery-latest.js"></script> <script> $(function () { $("input[type=radio]").click(function () { if ($(this).val() == '-1') { $('#aaa').css("display", "none"); } else { $('#aaa').css("display", "block"); } }) }) </script> </head> <body> <table> <tr> <td>提醒类型:</td><td> <input type="radio" name="sd_count" value="-1" checked>一次性提醒 <input type="radio" name="sd_count" value="0">重复提醒 </td> </tr> <tr id='aaa'> <td >提醒周期:</td> <td> <input type="text" name="sd_number" size="2" maxlength="2" value="1"></input> <input type="radio" name="sd_interval" value="ww" checked>周 <input type="radio" name="sd_interval" value="m">月 <input type="radio" name="sd_interval" value="yyyy">年 </select> </td> </tr> </table> </body> </html>
------解决方案--------------------
<table> <tr> <td>提醒类型:</td><td> <input type="radio" name="sd_count" value="-1" onclick='fun(this)' checked >一次性提醒 <input type="radio" name="sd_count" value="0" onclick='fun(this)'>重复提醒 </td> </tr> <tr id='tr'> <td >提醒周期:</td> <td> <input type="text" name="sd_number" size="2" maxlength="2" value="1"></input> <input type="radio" name="sd_interval" value="ww" checked>周 <input type="radio" name="sd_interval" value="m">月 <input type="radio" name="sd_interval" value="yyyy