Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.dom.CustomElement.append

Package: mlreportgen.dom

Append HTML content to custom element

Syntax

domObjOut = append(customElementObj,domObj)

Description

example

domObjOut = append(customElementObj,domObj) appends an element to a custom element.

Examples

collapse all

This example shows how to add a custom element that provides a check box in an HTML report.

Create and a custom element and append text to it.

import mlreportgen.dom.*;
d = Document('test');

input1 = CustomElement('input');
input1.CustomAttributes = { 
         CustomAttribute('type', 'checkbox'), ...
         CustomAttribute('name', 'vehicle'), ...
         CustomAttribute('value', 'Bike'), ...
         };
append(input1, Text('I have a bike'));

Append the custom element to an ordered list and display the report.

ol = OrderedList({input1});
append(d,ol);

close(d);
rptview('test','html');

Input Arguments

collapse all

Custom element to append content to, specified as an mlreportgen.dom.CustomElement object.

DOM object to append to the custom element.

Output Arguments

collapse all

DOM object appended to a custom element, represented by a DOM object.

Introduced in R2014b

Was this topic helpful?