Skip to content

Instantly share code, notes, and snippets.

@browolf
Created November 3, 2011 14:33
Show Gist options
  • Save browolf/1336633 to your computer and use it in GitHub Desktop.
Save browolf/1336633 to your computer and use it in GitHub Desktop.
web page for nano ween story
<SCRIPT LANGUAGE="JavaScript">
function CountLeft(field, count, max) {
if (field.value.length > max)
field.value = field.value.substring(0, max);
else
count.value = max - field.value.length;
}
</script>
<form method="post" action="submit.asp">
<font size="2" face="arial, helvetica, sans-serif"> Nano ween story:
<input name="text" type="text" size="140" onKeyDown="CountLeft(this.form.text, this.form.left,140);" onKeyUp="CountLeft(this.form.text,this.form.left,140);">
<input readonly type="text" name="left" size=3 maxlength=3 value="140"> characters left</font><p><input type="submit" value="Submit"/>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment