An electronic device including a battery and a locking mechanism, comprising: a base including a receiving bay and a battery bay, with the receiving bay including a first inner periphery, a first outer periphery and a through slot extending from the first inner periphery to the first outer periphery, with the battery bay including a periphery defining a second inner periphery and a second outer periphery, with the second inner and outer peripheries (121, 122) extending from the first inner and outer peripheries (111, 112) respectively, with the battery bay further including a connecting edge defined from the periphery thereof, with the connecting edge including a joining end defined thereon; a locking mechanism including a locking member and an elastic element received in the receiving bay, with the locking member being movable and including a clutching end defined thereon and extending through the joining end into the battery bay, with the elastic element including one of two distal ends joined to the receiving bay and the other distal end joined to the locking member, with the locking member further including an operation portion defined thereon for a user to operate the locking mechanism, with the operation portion located within the receiving bay and exposed to outside of the receiving bay through slot; a battery receivable and selectively restrained in the battery bay by the locking mechanism and including a connecting end defined thereon for engaging with the clutching end; and wherein the locking mechanism is operably movable between a first operating position to fasten the battery to the electronic device and a second operating position where the battery is adapted to be disengaged from the electronic device, with the connecting end of the battery restrained by the clutching end of the locking member when the locking mechanism is in the first operating position, with the locking member moved to a position such that the connecting end of the battery is unrestrained by the clutching end of the locking member in order to be lifted off the battery bay when the locking mechanism is in the second operating position; and wherein the operation portion of the locking member is in the form of a recess, and which is engaged by an actuating member that causes the locking mechanism to move from the first operating position to the second operating position thereof, with the actuating member including an end adapted to be inserted through the through slot for engagement with the operation portion. a base including a receiving bay and a battery bay, with the receiving bay including a first inner periphery, a first outer periphery and a through slot extending from the first inner periphery to the first outer periphery, with the battery bay including a periphery defining a second inner periphery and a second outer periphery, with the second inner and outer peripheries (121, 122) extending from the first inner and outer peripheries (111, 112) respectively, with the battery bay further including a connecting edge defined from the periphery thereof, with the connecting edge including a joining end defined thereon; a locking mechanism including a locking member and an elastic element received in the receiving bay, with the locking member being movable and including a clutching end defined thereon and extending through the joining end into the battery bay, with the elastic element including one of two distal ends joined to the receiving bay and the other distal end joined to the locking member, with the locking member further including an operation portion defined thereon for a user to operate the locking mechanism, with the operation portion located within the receiving bay and exposed to outside of the receiving bay through slot; a battery receivable and selectively restrained in the battery bay by the locking mechanism and including a connecting end defined thereon for engaging with the clutching end; and wherein the locking mechanism is operably movable between a first operating position to fasten the battery to the electronic device and a second operating position where the battery is adapted to be disengaged from the electronic device, with the connecting end of the battery restrained by the clutching end of the locking member when the locking mechanism is in the first operating position, with the locking member moved to a position such that the connecting end of the battery is unrestrained by the clutching end of the locking member in order to be lifted off the battery bay when the locking mechanism is in the second operating position; and wherein the operation portion of the locking member is in the form of a recess, and which is engaged by an actuating member that causes the locking mechanism to move from the first operating position to the second operating position thereof, with the actuating member including an end adapted to be inserted through the through slot for engagement with the operation portion.