I have the following javascript:\[code\]var orderItemQuantity = $('<input/>', { type: 'hidden', name: 'order_detail[][quantity]', value: itemQuantity});\[/code\]The above javascript throws the following error message:\[code\]Error: SyntaxError: DOM Exception 12\[/code\]This one works without error:\[code\]var newListItem = $('<li/>', { html: $('#item_name_'+itemId).text() + '(' + $('#item_quantity_' + itemId).val() +')' + '<a onclick="removeItem(' + itemId + ')">Delete this</a>' + '<input type="hidden" name="order_detail[][item_id]" value="' + itemId + '"/>', id: itemId});\[/code\]I checked the following question but the answer did not specify clearly the correct reason WHY.Here is my DTD:\[code\]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\[/code\]Question: Why does \[code\]$('<input/>')\[/code\] and \[code\]$('<input>')\[/code\] throw the said exception while \[code\]$('<li/>')\[/code\] is not a problem?