 |
LIMIT TEXT <!-- TWO STEPS TO INSTALL LIMIT TEXTAREA: 1. Copy the coding into the HEAD of y |
|
 |
|
|
 |
 |
|
<!-- TWO STEPS TO INSTALL LIMIT TEXTAREA:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Ronnie T. Moore -->
<!-- Web Site: Free Script And Source Code For Webmaster ,ASP,HTML,VB,Java, Java Script, Dhtml,xml,ajax,programming -->
<!-- Dynamic 'fix' by: Nannette Thacker -->
<!-- Web Site: http://www.shiningstar.net -->
<! >
<! >
<!-- Begin
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
countfield.value = maxlimit - field.value.length;
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<!-- textCounter() parameters are: text field, the count field, max length -->
<center>
<form name=myform action="YOUR-SCRIPT.CGI">
<font size="1" face="arial, helvetica, sans-serif"> ( You may enter up to 125 characters. )<br>
<textarea name=message wrap=physical cols=28 rows=4 onKeyDown="textCounter(this.form.message,this.form.remLen,125);" onKeyUp="textCounter(this.form.message,this.form.remLen,125);"></textarea>
<br>
<input readonly type=text name=remLen size=3 maxlength=3 value="125"> characters left</font>
</form>
</center>
<p><center>
<font face="arial, helvetica" SIZE="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">Free Script And Source Code For Webmaster ,ASP,HTML,VB,Java, Java Script, Dhtml,xml,ajax,programming</a></font>
</center><p>
<!-- Script Size: 1.37 KB -->
Tag : - - - -
|
|
 |
 |
 |
 |
Date :
2 มิ.ย. 2551 00:28:18 |
By :
arsachi |
View :
1804 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
<!-- TWO STEPS TO INSTALL LIMIT BOXES:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Glenn Wang ([email protected]) -->
<!-- Web Site: http://capsule.bayside.net/ -->
<!-- Modified by Ronnie T. Moore (Free Script And Source Code For Webmaster ,ASP,HTML,VB,Java, Java Script, Dhtml,xml,ajax,programming) -->
<! >
<! >
<!-- Begin
function countChoices(obj) {
max = 2; // max. number allowed at a time
box1 = obj.form.box1.checked; // your checkboxes here
box2 = obj.form.box2.checked;
box3 = obj.form.box3.checked; // add more if necessary
count = (box1 ? 1 : 0) + (box2 ? 1 : 0) + (box3 ? 1 : 0);
// If you have more checkboxes on your form
// add more (box_ ? 1 : 0) 's separated by '+'
if (count > max) {
alert("Oops! You can only choose up to " + max + " choices! \nUncheck an option if you want to pick another.");
obj.checked = false;
}
}
// End -->
</script>
</HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->
<BODY>
<center>
<form>
Please choose up to 2 sections:
<p>
<input type=checkbox name=box1 onClick="countChoices(this)">Section 1
<p>
<input type=checkbox name=box2 onClick="countChoices(this)">Section 2
<p>
<input type=checkbox name=box3 onClick="countChoices(this)">Section 3
<p>
</form>
</center>
<!-- Script Size: 1.55 KB -->
|
 |
 |
 |
 |
Date :
2 มิ.ย. 2551 00:30:42 |
By :
arsachi |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|