0

我有这个 HTML:

  <div id="URLs" style="display:block">
  <div>Insert New URL:
    <br/>
    <input type="text" id="NEW" value="" />
    <br/>Inserted URLs:
    <br/>
    <textarea id="direct_URLs" rows="0"></textarea>
  </div>
  </div>
  <input id="run" type="submit" value="Insert" />

而且,我有这个 jQuery:

  $("#run").click(function () {
  if ($("#NEW").val() !== "") {
    $("#direct_URLs").append(($("#direct_URLs").val() == '' ? '' : "\n") + $("#NEW").val());
    $("#direct_URLs").attr('rows', function (i, val) {
      var cnt = parseInt(val, 10) || 0;
      return isNaN(cnt) ? 1 : cnt + 1;
    });
  }
  });

我一直在NaNrows=NaN

我已经尝试过并且确实在这里设置了提到的代码:http: //jsfiddle.net/s3GDr/1/,它工作得很好。但是,在我的页面上.. 它不是..!! 这让我发疯,我已经尝试了我所关注的每一件事(谷歌搜索,其他问题等)。拜托,一些人对此有所了解..!! :(

4

0 回答 0