js操作table之 移动tr位置(JS mobile tr location for table operation).docVIP

  • 3
  • 0
  • 约6.69千字
  • 约 16页
  • 2017-09-27 发布于河南
  • 举报

js操作table之 移动tr位置(JS mobile tr location for table operation).doc

js操作table之 移动tr位置(JS mobile tr location for table operation)

js操作table之 移动tr位置(JS mobile tr location for table operation) JS table TR FF compatible with IE mobile location 2010-03-17 17:34:00| classification: front-end development | Tags: | name and subscription. DOCTYPE, HTML, PUBLIC, -//W3C//DTD, XHTML, 1.0Transitional//EN, /TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns= /1999/xhtml head meta http-equiv= Content-Type content= text/html; charset=utf-8 / title Untitled Document /title script language= JavaScript Var mousePos; Function Up_Move (obj) { Try{ If (document.all) { Document.getElementById (show_input).Style.top = mousePos.y Document.getElementById (show_input).Style.left = mousePos.x }else{ Document.getElementById (show_input).Style.top =mousePos.y+ PX; Document.getElementById (show_input).Style.left =mousePos.x+ PX; } }catch (E) {} Show_input_div (); Document.getElementById (shuzhitijiao),.Onclick=function () { Varmove_no=document.getElementById (move_no).Value; Move_no=parseInt (move_no); If (move_no==), ||isNaN (move_no)) { Alert (enter the number of digits to move); Document.getElementById (move_no).Focus (); Return; } Hidden_input_div (); Vartable_obj, tr_obj, tr_move_obj; Tr_obj=obj.parentNode.parentNode; Table_obj=tr_obj.parentNode; For (vari=0; itable_obj.childNodes.length; i++) { If (tr_obj, ==table_obj.childNodes[i]) { If (i==0) { Alert (this record is already first); Return; } If (navigator.userAgent.indexOf (MSIE) 0) { If (imove_no) { Tr_move_obj=table_obj.childNodes[0]; }else{ Tr_move_obj=table_obj.childNodes[i-move_no]; } }else{ Move_no=move_no*2; If (imove_no) { Tr_move_obj=table_obj.childNodes[0]; }else{ Tr_move_obj=table_obj.childNodes[i-move_no]; } } Document.getElementById (move_no).Value=; Break; } } Table_obj.removeChild (tr_obj); Table_obj.insertBefore (tr_obj, tr_move_obj); Document.getElementById (move_no).Value=; } Document.getElementById (shuzhiquxiao),.Onclick=function () { Hidden_input_div (); } } Function Down_Move (obj) { Try{ If (document.all) { Document.getElementById (show_in

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档