An electronic device having a sliding assembly is described. A cantilever having a slide-proof pad is disposed on a bottom surface of a casing, and a sliding assembly corresponding to the cantilever is disposed in the casing. When the casing is pressed, the sliding assembly extends outside the slide-proof pad through an elastic displacement of the cantilever, such that the sliding assembly supports the casing to a higher position, and the casing slides on and contacts with a plane through the sliding assembly; alternatively, the sliding assembly retracts into the slide-proof pad, such that the slide-proof pad contacts with the plane, and the casing does not slide freely on the plane through interference contact of the slide-proof pad.