<form name="form1" action="confirm.nhn" method="post">
<br>
Sex:
<input type="radio" value="1"  name="man.sex">
Male
<input type="radio" value="2" name="man.sex">
Female
<br>
Hobbies:<input type="checkbox" value="1" id="man.hobbie" name="man.hobbie">
Music
<input type="checkbox" value="2" id="man.hobbie"  name="man.hobbie">
Sport
<input type="checkbox" value="3" id="man.hobbie" name="man.hobbie">
Movie
<br>Self Description:<br>
<textarea id="man.description" name="man.description"></textarea><br>
<br>
<input type="button" value="Submit" name="button1" onclick="javascript:deal()">
<br>
</form>
    <script type="text/javascript">
        function deal(){
            document.form1.submit();
        }
          $(function(){
          $('#man.description').text("sssddf");
          })
         
        
 
    </script>
我觉得问题出在选择器上,如果用$('textarea')就正常.晕哪,搜遍了也没发现有人碰见过类似问题.

解决方案 »

  1.   

    首先你要把id中的.去掉,
    然后你再把$('#man.description').text("sssddf");
    改为$('#man.description').val("sssddf");
    因为在ff3。0下text有bug
      

  2.   

    把你的form写完,用浏览器跑一遍,看一下源文件就知道man.description的真正id是什么啦
    再把真正的id加上去就可以了
      

  3.   

    应该是id中的点的问题,难道id不能使用点?
      

  4.   

    方法倒是有,你可以把.前面加2个\\
    即. ==> \\.
    但没必要ID里有点啊?
      

  5.   

    id可以不带点,但name必须,因为用webwork,也就是struts2,要用这个区分对象属性。
      

  6.   

    我也遇到了这个问题,却是根据id取到节点以后不能赋值,改为$('textarea')就正常。有没有人知道什么原因啊?
      

  7.   

    uuunjhj