Create replaceClass.js

implement the idea of replaceClass by the fewest times of the  reflow and repaint