<form name='theform'>
<input type='text' name='content' value='' onblur='strlen();'>
</form>
<script>
var a;
function strlen(){
return document.forms['theform'].content.value.length;
}
a = strlen();//a被赋值
</script>
<input type='text' name='content' value='' onblur='strlen();'>
</form>
<script>
var a;
function strlen(){
return document.forms['theform'].content.value.length;
}
a = strlen();//a被赋值
</script>
<form name='theform'>
<input type='text' name='content' value='' onblur='strlen();'>
</form>
<script>
function strlen(){
a = document.forms['theform'].content.value.length;
alert('a='+a);
}
</script>
{
return str.length;
}
var a=strlen(theform.content.value)