Create function jquery check input val
Create function jquery check input val
Create function check input.val
Could someone help?
position check and add product
<p>Check all input val(not same) to Add product</p>
<div id="product_table">
<div><input type="text" class="p_id" name="p_id" value="d-001"></div>
<div><input type="text" class="p_id" name="p_id" value="d-002"></div>
</div>
select list to click function
<p>Select Product(Form Database) to click function</p>
<div id="prduct_list">
<ul>
<li onclick='fill_p("d-001");' value="d-001">d-001</li>
<li onclick='fill_p("d-002");' value="d-002">d-002</li>
<li onclick='fill_p("d-003");' value="d-003">d-003</li>
<li onclick='fill_p("d-001");' value="d-004">d-004</li>
<li onclick='fill_p("d-002");' value="d-005">d-005</li>
<li onclick='fill_p("d-003");' value="d-006">d-006</li>
</ul>
</div>
//function check
function fill_p(Value)
var html = '<div><input class="p_id" value="'+Value+'"></div>';
var inputpid = $('#product_table').find('.p_id:input').val();
if(inputpid !== Value)
$('#product_table').append(html);
enter image from here
Did not understand the problem you are facing. Do you want to read selected
li value and create input if not already there and if already there then add value?– Bhushan Kawadkar
Aug 24 at 10:54
li
ul list >> by database, and function to check input val to add not same
– Pongsathorn Rakkaew
Aug 24 at 12:19
1 Answer
1
ul list >> by database, and function to check input val to add not same

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Please write what you want to check?
– Parth Raval
Aug 24 at 10:53