JSFiddle - React, Tailwind, and code Playground

by Dörnesz Tamás

HTML

<input data-id='x' placeholder='kutya' type='text'>

CSS

.bar {
    font-size: 10pt;
}

JavaScript

var select = $("input");
var div = document.createElement("input");

var attributes = select.attr;
for(i in attributes){
	var name=attributes[i].name;
	//var value=attributes[i].value;
	//div.attr(name,value);
  console.log(name);
}
//$.each(attributes, function() {
//    div.attr(this.name, this.value);
//});
$('body').append(div);