0

我有以下代码。它在Firefox中运行良好,但在ie9中无法运行?

<script src="http://google-cdn.joinpgn.com/js/jquery/jquery-1.5.2.min.js"></script> 
<!--[if lt IE 9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
<script type="text/javascript" src="js/jquery.elastic.source.js"></script>

<textarea id="description" style="overflow: hidden; height: 20px;">This textarea is going to grow when you fill it with text. Just type a few more words in it and you will see. </textarea>

<script>
jQuery('#description').elastic();

</script>

<style>

textarea { font-family: Arial, 'sans-serif' }
</style>
4

1 回答 1

0

你的代码搞砸了,不干净,你根本没有启动 $(function()) 。

   <script type="text/javascript">
    $(function(){
    $('#description').elastic();
    });
    </script>
于 2011-07-26T02:30:16.173 回答