<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head><body><input type=text id=tbxText onkeyup="showInfo()" onkeydown="checkInput()">
<input type=text id=tbxLength value=0>
<input type=text id=tbxLeft value=50>
<script language="javascript">
function showInfo()
{
tbxLength.value =strLength(tbxText.value);
tbxLeft.value = 50-strLength(tbxText.value);
}function checkInput()
{
if(parseInt(tbxLeft.value)<1)
{
event.cancelBubble = true
event.returnValue = false;
}
}
function strLength(str)
{
var l=str.length;
var n=l
for (var i=0;i<l;i++)
{
if (str.charCodeAt(i)<0||str.charCodeAt(i)>255) n++
}
return n
}
</script>
</body></html>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head><body><input type=text id=tbxText onkeyup="showInfo()" onkeydown="checkInput()">
<input type=text id=tbxLength value=0>
<input type=text id=tbxLeft value=50>
<script language="javascript">
function showInfo()
{
tbxLength.value =strLength(tbxText.value);
tbxLeft.value = 50-strLength(tbxText.value);
}function checkInput()
{
if(parseInt(tbxLeft.value)<1)
{
event.cancelBubble = true
event.returnValue = false;
}
}
function strLength(str)
{
var l=str.length;
var n=l
for (var i=0;i<l;i++)
{
if (str.charCodeAt(i)<0||str.charCodeAt(i)>255) n++
}
return n
}
</script>
</body></html>
<SCRIPT language=JavaScript>
function get_strLength(str){
var l=str.length;
var n=l
for (var i=0;i<l;i++)
{
if (str.charCodeAt(i)<0||str.charCodeAt(i)>255) n++
}
return n
}function changeByte(value,limitedLength){
var l=get_strLength(value)
if (l<=limitedLength) {
if (document.all!=null) document.all("byte").innerText="还可以输入 "+(limitedLength-l)+" 字节"
}
else
{
document.all("byte").innerText="输入字节数("+ l +")超出范围("+ limitedLength +")!";
document.all("byte").style.color="red";
}
return true
}
function checkData(value,limitedLength){
var l=get_strLength(value);
if (l>limitedLength) {
alert("输入字节数("+ l +")超出范围("+ limitedLength +")!");
return false;
}
}
</SCRIPT><span class="teal">请在此留下宝贵意见: </span>
<form onsubmit="return checkData(document.form1.advise_content.value,200)" action="op_manual.asp?op_start=1" method="post" name="form1" target="_blank">
<textarea name="advise_content" cols="50" rows="5" maxlength="18" id="advise_content" onkeydown="return changeByte(document.form1.advise_content.value,200)" onkeyup="return changeByte(document.form1.advise_content.value,200)"></textarea>
<input type="submit" name="Submit" value="提 交">
<SPAN id=byte style="font-size:12px">
<SCRIPT language=JavaScript>changeByte(document.form1.advise_content.value,200);</SCRIPT>
</SPAN>
</form>
<input id=text1 value=0>
<input id=text2 value=55>
<input type=text disabled name=text2 value=55>
<script>
function minus_text2(obj){
if(parseInt(document.all.text2.value)>0)
document.all.text2.value=parseInt(document.all.text2.value)-1;
else
obj.disabled=true;
}
</script>
<input id=text1 value=0>
<input id=text2 value=55>