Using the following code
使用以下代码
var newDiv = $(document.createElement("div"));
var newTextBox;
newTextBox = $(document.createElement("input"))
.attr("type", "text")
.attr("id", "textbox")
.attr("name", "textbox");
newTextBox.val("text");
newDiv.append(newTextBox);
alert(newDiv.html());
var newDiv