JSFiddle - React, Tailwind, and code Playground

HTML

<div id="ccMatrix">        </div>

JavaScript

$( document ).ready(function(){

	ccmatrix = $("#ccMatrix");
	var form = $("<form/>", {action: '#',method: '#'}); 
	counter = 0;		
		for(i=0; i<3; i++)
		{
			
				for(j=0; j<3; j++)
				{	
					counter++;	
					$(ccmatrix).append($("<input/>", {
						type: 'text',
						id: 'result',
						name: 'u_i',
						size: '1px',
						value: counter
						})).append('<br>');
					if(i===0) $('input').css({backgroundColor: '#ff11aa'});
//          if(i===1) $('input').css({backgroundColor: '#aaff11'});
//          if(i===2) $('input').css({backgroundColor: '#11aaff'});
          
				}
		}		
});