A receiving device for an electronic device, to hold a stylus, includes a top member, a bottom member, and a connection member. The bottom member faces the top member, the connection member is arranged between the top member and the bottom member. A clamping member and a receiving member are formed between the top member, the bottom member, and the connection member. The clamping member faces away from the receiving member, the clamping member is clamped onto an electronic device, the receiving member receives a stylus.