项目需要,用到了两个框架,冲突解决如下:
注意:首先加载jquery:
<script type='text/javascript' src='res/js/jquery-1.3.2.js'></script>
然后解决$冲突
<script type='text/javascript'>
JQ = $; //rename $ function,个人比较喜欢用“$j”
$='hi';//将$赋无意义值
</script>
最后加载prototype:
<script type='text/javascript' src='../javascripts/prototype.js'> </script>
之后使用JQ代替平时用的$就可以了
注意:首先加载jquery:
<script type='text/javascript' src='res/js/jquery-1.3.2.js'></script>
然后解决$冲突
<script type='text/javascript'>
JQ = $; //rename $ function,个人比较喜欢用“$j”
$='hi';//将$赋无意义值
</script>
最后加载prototype:
<script type='text/javascript' src='../javascripts/prototype.js'> </script>
之后使用JQ代替平时用的$就可以了