  Microflares are small activities in solar low atmosphere, some are in the low
corona, and others in the chromosphere. Observations show that some of the
microflares are triggered by magnetic reconnection between emerging flux and a
pre-existing background magnetic field. We perform 2.5D compressible resistive
MHD simulations of magnetic reconnection with gravity considered. The
background magnetic field is a canopy-type configuration which is rooted at the
boundary of the solar supergranule. By changing the bottom boundary conditions
in the simulation, new magnetic flux emerges up at the center of the
supergranule and reconnects with the canopy-type magnetic field. We
successfully simulate the coronal and chromospheric microflares, whose current
sheets are located at the corona and the chromosphere, respectively. The
microflare of coronal origin has a bigger size and a higher temperature
enhancement than that of chromospheric origin. In the microflares of coronal
origin, we also found a hot jet ($\sim$$1.8 \times 10^6$ K), which is probably
related to the observational EUV/SXR jets, and a cold jet ($\sim$$10^4$ K),
which is similar to the observational H$\alpha$/Ca surges, whereas there is
only an H$\alpha$/Ca bright point in the microflares of chromospheric origin.
The study of parameter dependence shows that the size and strength of the
emerging magnetic flux are the key parameters which determine the height of the
reconnection location, and further determine the different observational
features of the microflares.
