JSFiddle - React, Tailwind, and code Playground

by Lee Cooper

HTML

<input type="text" name="a" />

JavaScript

// This is to prove attaching the attribute programmatically means that it can be located
$(function() {
   
    console.log($('input[placeholder]'));
    console.log($('input[name="a"]').attr('placeholder', 'test'));
    console.log($('input[placeholder]'));
});