i have a website done in php, which has a form for user to select a certain data, on selection of the data, after that user has the option to generate random value, so the random value should start with the select box value and some random number, so far i did the following:
function Random() {
var rnd = Math.floor(Math.random() * 1000000000);
document.getElementById('tb').value = rnd;
}
<select class="form-control" name="customer" aria-label="Default select example">
<option value="">Select Customer</option>
<?php
foreach($listcustomers as $valw){?>
<option value="<?=$valw->name?>">
<?=$valw->name?>
</option>
<?php }?>
</select>
<input type="button" onclick="Random();" class="btn btn-outline-warning" value="GENERATE">
<input type="text" name="sku" class="form-control" id="tb" placeholder="SKU" value="" required>
this is generating random number on button click, but how do i start the random number with the value of user selected value in selectbox, can anyone please tell me, thanks in advance