Regular Expression for IP Validation

Here is the regular expression for IP validation

“^([01]?\\d\\d?|2[0-4]\\d|25[0-4])\\.” +
“([01]?\\d\\d?|2[0-4]\\d|25[0-4])\\.” +
“([01]?\\d\\d?|2[0-4]\\d|25[0-4])\\.” +

this will work for range till

you can use this javascript validation with regular expression.


jQuery required validation

<script src=""></script>
<script type="text/javascript" 
<script type="text/javascript">
	debug: true,
	success: "valid"

  rules: {
    fruit: "required"
  <style>#fruit { margin-left: .5em; float: left; }
  	#fruit, label { float: left; font-family: Arial, Helvetica, sans-serif; font-size: small; }
	br { clear: both; }
	input, select { border: 1px solid black; margin-bottom: .5em;  }
	select.error { border: 1px solid red; }
	label.error {
		background: url('') no-repeat;
		padding-left: 16px;
		margin-left: .3em;
	label.valid {
		background: url('') no-repeat;
		display: block;
		width: 16px;
		height: 16px;

<form id="myform">
  <label for="fruit">Please select a fruit</label>
  <select id="fruit" name="fruit" title="Please select something!"
    <option value=""></option>
    <option value="1">Banana</option>
    <option value="2">Apple</option>
    <option value="3">Peach</option>
  <input type="submit" value="Validate!" />


you can use this for any input validation.
Its very easy...use it,,,,,,!!!!!!!!!!!!!1111

Show and Hide DIV using javascript


<script language=”JavaScript” type=”text/javascript”>
function Test(rad){
var rads=document.getElementsByName(;

<input name=”selection” type=”radio”  onclick=”Test(this);”/>
<input name=”selection” type=”radio”  onclick=”Test(this);”/>

<div id=”courier”>Select your courier:<br />
Blah blah….Dropdown to come here</div>



when you load the page nothing will be selected.

but when you select first radio button it will hide the div and when  second radio button selected it will show the div.

you can use this for table hide .

its so simple with javascript.

Try this ……..!!!!!!!!!!!