高手请进!!!
解决方案 »
- 关于母版页div在引用页中背景图片不显示问题
- 怎么在JS中 判断用户控件中的textbox有没有填写
- js 怎么获取datalist中绑定的img的路径值
- MVC2中返回值问题,请进!
- 无法将程序集“DALFactory.dll”复制到文件,怎么解决?
- 各位好,帮我想一下咋回事!!
- 在线人数统计:为什么session没有过期,或者END事件没有触发?
- 用什么控件可以显示这种格式
- DataTable中的行列问题
- 在aspx.vb里写代码,怎么样能取出字段里的值给变量?
- 在线求教关于Asp.net的问题:如何弹出一个模式窗口(提示信息窗口,不关闭此窗口,无法对其他窗口进行操作)
- 为什么在Datagrid里不能排序?
2.
<asp:textbox id=txtDetails style="Z-INDEX: 102; LEFT: 8px; POSITION: absolute; TOP: 44px" runat="server" Height="100px" Width="600px" TextMode="MultiLine"></asp:textbox>
<SCRIPT language=javascript>displaylimit("document.forms[0]._ctl0_txtDetails",2000)</SCRIPT>
</asp:Panel>
function displaylimit(theform,thelimit){
var limit_text='<span id="'+theform.toString()+'" style="VISIBILITY: hidden"></span> '
if (document.all||ns6)
document.write(limit_text)
if (document.all){
eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
eval(theform).onfocus=function(){ countlimit(thelimit,event,theform)}
}
else if (ns6){
document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true);
document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true);
}
}
{
var intlen=sText.value.length;
if (intlen<=len && intlen>len/2)
intlen=bitLenght(sText);
if (intlen>len)
{ alert("The content length must Less than or Equal "+len);
sText.focus();
sText.select();
}
}function bitLenght(sText)
{
var intlen;
intlen=0;
for(var i=0; i<sText.value.length; i++)
{
if(sText.value.charCodeAt(i)>255)
{
intlen=intlen+2;
}
else
{
intlen++;
}
}
return intlen;
}
this.txtDescription.Attributes.Add("onblur","isOver(this,2000);");