Q:

How to change border style with multiple input using loop? 

How to change border style with multiple input using for loop with JavaScript? 
When I fill 1 into every input type="text" and then press submit button. 
It's changes border style only 
<input type="text" id="price1" size="20" name="price[]">

But I want to change border style all 3 input with for loop. 
How to do that ? 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

<form onsubmit="return checkform(this);">
<div id="p_scents_price">
    <p>
        <label for="p_scnts_price">
            <input type="text" id="price1" size="20" name="price[]">
        </label>
    </p>
</div>
<div id="p_scents_price">
    <p>
        <label for="p_scnts_price">
            <input type="text" id="price2" size="20" name="price[]">
        </label>
    </p>
</div>
<div id="p_scents_price">
    <p>
        <label for="p_scnts_price">
            <input type="text" id="price3" size="20" name="price[]">
        </label>
    </p>
</div>
<input type="submit" name="submit" value="OK">
</form>

<script language="JavaScript" type="text/javascript">
<!-- 
function checkform ( form )
{
  var z = 1;
  for(var z=1;z<10;z++) 
  {
    if ((document.getElementById("price"+z).value ! = "") && (document.getElementById("price"+z).value < "1.5")) {
      document.getElementById("price"+z).style.border = "1px solid red";
      return false ;
    }
    else {
      document.getElementById("price"+z).style.border = "1px solid #d5d5c5";
    }
  }
return true ;
}
//-->
</script>

A:

Some issues there:

You cannot use the same id on more than one element
The for attribute on a label must refer to the form field that it relates to, not a div
You don't need or want a for attribute on a label that contains the input it relates to
This: document.getElementById("price"+z).value < "1.5" does a string comparison.  If you want to compare numbers, remove the quotes from 1.5 and JavaScript's algorithm for < will convert the value string to a number before doing the comparison.  Or, since the number is entered by a person, you may want to use parseInt(..., 10) to explicitly ensure that you parse it in base 10, although parseInt allows extra characters after the number. 
In your code, the first time an element's value is < "1.5", you do return false.  That stops the loop.  You might want to have a variable, isValid or similar, that you set true to start with and then set false when you find a problem, then return that. 
Your loop goes from 1 to 10 but you only have three priceN inputs.  Rather than hardcoding loop limits, it's usually best to let the markup drive the code. 
The =1 in var z=1 is pointless if you do it again on the next line; similarly, declaring a variable twice is pointless
When you find yourself repeatedly calling a function to get the same thing over and over and over again (document.getElementById("price"+z")), consider doing it only once and saving the result to a variable

A few suggestions (see comments):
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

<form onsubmit="return checkform(this);">
<div><!-- Change: Removed `id` from these divs -->
    <p>
        <label><!-- Change: Removed `for` from these labels -->
            <!--  Change: Changed `id="priceN"` to `class="price"` on these inputs -->
            <input type="text" class="price" size="20" name="price[]">
        </label>
    </p>
</div>
<div>
    <p>
        <label>
            <input type="text" class="price" size="20" name="price[]">
        </label>
    </p>
</div>
<div>
    <p>
        <label>
            <input type="text" class="price" size="20" name="price[]">
        </label>
    </p>
</div>
<input type="submit" name="submit" value="OK">
</form>

<script language="JavaScript" type="text/javascript">
// Change: Rewrote; also removed archaic <!--  comments, you don't need them
function checkform ( form )
{
  // Get a list of all of the elements with the "price" class
  var list = document.querySelectorAll(".price");
  var z;
  var input;
  var isValid = true;
  var value;

  // Loop through the list
  for (z = 0; z < list.length; ++z) {
    console.log("z = " + z);
    // Get this input
    input = list[z];

    // Check its value
    if (input.value ! = "" && parseInt(input.value, 10) < 1.5) {
      // Not valid, set border and flag that the form is invalid
      input.style.border = "1px solid red";
      isValid = false;
    }
    else {
      // Valid, clear any previous red border
      input.style.border = "1px solid #d5d5c5";
    }
  }

  // Return result
  return isValid;
}
</script>

Working example:

// Change: Rewrote; also removed archaic <!--  comments, you don't need them
function checkform ( form )
{
  // Get a list of all of the elements with the "price" class
  var list = document.querySelectorAll(".price");
  var z;
  var input;
  var isValid = true;
  var value;

  // Loop through the list
  for (z = 0; z < list.length; ++z) {
    console.log("z = " + z);
    // Get this input
    input = list[z];

    // Check its value
    if (input.value ! = "" && parseInt(input.value, 10) < 1.5) {
      // Not valid, set border and flag that the form is invalid
      input.style.border = "1px solid red";
      isValid = false;
    }
    else {
      // Valid, clear any previous red border
      input.style.border = "1px solid #d5d5c5";
    }
  }

  // Return result
  return isValid;
}
<form onsubmit="return checkform(this);">
  <div><!-- Change: Removed `id` from these divs -->
    <p>
      <label><!-- Change: Removed `for` from these labels -->
        <!--  Change: Changed `id="priceN"` to `class="price"` on these inputs -->
        <input type="text" class="price" size="20" name="price[]">
      </label>
    </p>
  </div>
  <div>
    <p>
      <label>
        <input type="text" class="price" size="20" name="price[]">
      </label>
    </p>
  </div>
  <div>
    <p>
      <label>
        <input type="text" class="price" size="20" name="price[]">
      </label>
    </p>
  </div>
  <input type="submit" name="submit" value="OK">
</form>

