The code for javascript to delete horizontal lines is "body object.removeChild(hr object)". The horizontal line is defined using the hr element. You only need to use the javascript removeChild() function to remove the hr element from the parent element body to delete the horizontal line.
The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.
javascript delete horizontal line
The horizontal line is defined using the hr element.
If you want to delete the horizontal line, you only need to use the javascript removeChild() function to delete the hr element from the parent element body to delete the horizontal line.
Example:
Description:
removeChild() method can remove a node from the child node list. The usage is as follows:
nodeObject.removeChild(node)
The parameter node is the node to be deleted. If the deletion is successful, the deleted node is returned; if it fails, null is returned.
When using the removeChild() method to delete a node, all child nodes contained in the node will be deleted at the same time.
【Related recommendations: javascript video tutorial, web front-end】
The above is the detailed content of What is the code to delete horizontal lines in javascript. For more information, please follow other related articles on the PHP Chinese website!