- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
moz-text-overflow.js
上传用户:weisheen
上传日期:2022-07-09
资源大小:19390k
文件大小:2k
源码类别:
ActiveX/DCOM/ATL
开发平台:
Visual C++
-
- function initMozTextOverflow(obj)
- {
- function re_render()
- {
- doMozTextOverflow(obj);
- }
- setTimeout(re_render,0);
- }
- function doMozTextOverflow(obj)
- {
- function _overflow(e)
- {
- var el = e.currentTarget;
- el.className="_textOverflow";
- }
- function _underflow(e)
- {
- var el = e.currentTarget;
- el.className="_textUnderflow";
- }
- obj.className="_textUnderflow";
- obj.addEventListener("overflow", _overflow, false);
- obj.addEventListener("underflow", _underflow, false);
- obj.ins = document.createElement("ins");
- obj.ins.innerHTML="…";
- obj.appendChild(obj.ins);
- /*
- obj.onmousedown = function(e)
- {
- this.selectStartX = e.clientX - document.getBoxObjectFor(this).x;
- }
- obj.onmouseup = function(e)
- {
- this.selectStartX = null;
- }
- obj.onmousemove = function(e)
- {
- if(this.selectStartX!=null )
- {
- var mx = e.clientX - this.selectStartX;
- var ex = this.offsetWidth - this.selectStartX;
- if( ( ex - mx) < (this.ins.offsetWidth+3) )
- {
- if(this.className!="_textUnderflow")
- {
- this.className="_textUnderflow";
- this.scrollLeft=0;
- var box = document.createElement("input");
- box.setAttribute("type","text");
- box.value=1111
- this.appendChild(box);
- box.select();
- this.removeChild(box);
- this.focus();
- }
- }
- else
- {
- if(this.className!="_textOverflow")
- {
- this.className="_textOverflow"
- }
- }
- return false;
- }
- };
- */
- }