首页 > 解决方案 > jquery 在我的浏览器上不起作用认为相同的代码适用于 jsfiddle 尝试了所有必要的标签以及 noconflict 标签

问题描述

<!DOCTYPE html>
<html>
<head>
    	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
        <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
  	<script type="text/javascript">
  		$(document).ready(function(e) {
    $('#boxx').keyup(function(e) {
      var txtVal = $(this).val();
        $('#boxx1').val(txtVal);
    });
    $('#boxx1').keyup(function(e) {
        var txtVal = $(this).val();
        $('#boxx').val(txtVal);
    });
});
  	</script>
</head>
<body>
  <input type="text" value="" id="boxx"/>
  <input type="text" value="" id="boxx1"/>
  <div></div>

</body>
</html>

这是所有的代码,但它似乎不起作用,但它在 jsfiddle 上运行良好请帮助我,我是 jquery 的新手

标签: javascriptjquery

解决方案


推荐阅读