Posts

Showing posts from September, 2021

Javascript Get Attribute Input By Value

aksi ini dapat digunakan untuk mendapatkan suatu atribut dari suatu tag namun hanya value nya saja yang memiliki variable yang unik This action can be used to get an attribute from a tag but only its value has a unique variable $(document).ready(function(){ var input = $('.class-input:input[value="1"]'); alert(input.attr("name")); //id //title }); atau $(document).ready(function(){ var input = $('input[value="1"]'); alert(input.attr("name")); //id //class //title }); Note : with JQuery irpian, irpie, excrozer, bang irpie, excrozer design, programming, javascript, jquery, tutorial, script, value, get element,