createProcessingInstruction method
Creates a ProcessingInstruction node given the specified name and data strings.
createProcessingInstruction(target, data)
Parameters
String target
The target part of the processing instruction.
String data
The data for the node.
Returns
ProcessingInstruction. The new ProcessingInstruction object.
Throws
DOMException
INVALID_CHARACTER_ERR: Raised if the specified target contains an illegal character.
NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
这对您有帮助吗?