Adding and Removing Elements

日本語のページ

You can add or remove elements from a web page displayed in a pop-up window.

Adding an Element

You can add elements to the following positions relative to a specific element on the web page:

  • Immediately before the element
  • Immediately after the element
  • The first child element of the element
  • The last child element of the element

Elements are added using the "add XX after XX" block.

Add element

The first parameter specifies the reference element.
The "after" drop-down list specifies the destination position.

The last parameter specifies what you want to add.
You can directly specify an HTML string for this parameter.
You can also specify the "element created from HTML in XX" block.

Create element

Remove element

You can remove an element from a web page using the "remove XX" block.
The "XX" parameter specifies the element to delete.

Remove element

Example

The following example demonstrates adding and removing elements.
You can download this example from here
Additionally, the HTML file to open with this program can be downloaded from here.
Create a folder called "html" in the Tsumicky installation folder and place the HTML file in that folder.

Example of adding and removing elements

A new element is added after the element with the ID "to_add".
Also, the element with the ID "to_delete" is deleted.

This is the display immediately after running the program.
The element with the ID "to_add" is assigned the ID "to_add".
Also, the element with the ID "to_delete" is assigned the ID "to_delete".

Immediately after running the examples for adding and removing elements

This is the display after 3 seconds have passed since the program started running.
An element has been added after the "Add element after this element" element.
Also, the "Delete this element" element has been deleted.

The display after 3 seconds of running the example of adding and removing elements