A method and apparatus for updating a web directory is provided in an embodiment of that present invention, an electronic device and a storage medium. The methods include: When a drag action on the page where the web directory is located is detected to begin, the directory to be adjusted in the web directory is determined, When the drag end operation acting on the page is detected, the response type triggered in the page by the drag end operation is determined, the attribute information of the directory to be modified is modified according to the response type, and the page is rendered according to the modified attribute information to obtain the updated web directory. In accordance with that above process, The user can drag the directory to be adjusted to the specified position accordingto the demand, and accordingly, according to the response type triggered in the page by the drag end operation, the attribute information of the directory can be modified, and the page can be renderedagain to obtain the updated web directory, which can simplify the operation of the user and improve the efficiency of updating the web directory.