7 Replies Latest reply on Oct 6, 2016 11:27 PM by xu zhang

    two canvas,one js.how do it?

    xu zhang Level 1

      hi,

      for example:

      <script type="text/javascript" src="my.js"></script>
      <script type="text/javascript" src="a.js"></script>
      <script type="text/javascript" src="b.js"></script>
      <body>
      <canvas id="a"></canvas>
      <canvas id="b"></canvas>
      <body>
      

      my.js

      function page(that){
       var t=false
      }
      

      a.js and b.js include my.js.

       

      How to resolve the conflict