好东东给你,可用分给偶~~
功能:自动调整多行文本框录入高度加强版;
语言:VbScript
版权:蒋玉龙 Lovingkiss
QQ:66840199
页面一:自动调整.htm
说明:DefaultHeight=80 默认高度 MaxHeight=300 最大高度
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>自动调整</title>
<style>
.textarea {behavior:url(textarea.htc);overflow-y:auto;}
</style>
</head>
<body>
<textarea Id=MyText class="textarea" DefaultHeight=80 MaxHeight=300 rows="5" cols="41"></textarea>
</body>
</html>
页面二:textarea.htc文件
<PUBLIC:COMPONENT>
<PUBLIC:ATTACH onevent="propertychange()" event="onpropertychange"/>
</PUBLIC:COMPONENT>
<script language="VbScript">
Sub propertychange()
On Error Resume Next
If Window.Event.srcElement.scrollHeight >=Clng(Window.Event.srcElement.DefaultHeight) Then
If Window.Event.srcElement.MaxHeight <> "0" Then
If Window.Event.srcElement.scrollHeight <=Clng(Window.Event.srcElement.MaxHeight) Then
Window.Event.srcElement.Style.posHeight=Window.Event.srcElement.scrollHeight+15
Else
Window.Event.srcElement.Style.posHeight =Clng(Window.Event.srcElement.MaxHeight)
End If
Else
Window.Event.srcElement.Style.posHeight=Window.Event.srcElement.scrollHeight+15
End If
Else
Window.Event.srcElement.Style.posHeight=Clng(Window.Event.srcElement.DefaultHeight)
End IF
End Sub
</script>
'—————以上为代码部分—————————————
注明:功能不是很强,但是还算实用,本人可用分数很低了,如果您觉得不错,想使用的话,希望不要赖皮,标明出处——顺便给偶转点可用分!!~如果您觉得不好,或者你愣是要白用,偶也没有法子;不用过多的批评偶~~
偶也不想白要您的可用分~~谢谢
~~~~~~~~~~~~~~只是交换而已~~~~~~~~~~~~~~
另外:还有一些技巧,可以用可用分交换~~
在先编辑完整版[无控件、Js、Vbs]:5000可用分
邮件JMail:1000可用分
拼音判断:200可用分
身份证判断:300可用分
农历日期控件:300可用分
MD5转换:300可用分
——这些网络上有~~但是从我这里呢,需要给偶点可用分~~嘿嘿~~
~~~~~~~~等偶可用分够用了,全部免费贡献给大家~~~~~~~~~~~~~
好不好不要批评阿~~