本课介绍用于在 Customer 表的各行之间前移和后移的代码。
将 Next 函数添加到 tutorial.js:
function Next() { if( ! CustomerTable.moveNext() ) { CustomerTable.moveLast(); } } |
将 Prev 函数添加到 tutorial.js:
function Prev() { if( ! CustomerTable.movePrevious() ) { CustomerTable.moveFirst(); } } |
将以下函数添加到 main.htm:
function ClickNext() { Next(); DisplayRow(); } |
function ClickPrev() { Prev(); DisplayRow(); } |
当窗体第一次显示时,由于当前位置是在第一行的前面,所以控件是空的。在窗体显示后,单击 [Next] 和 [Previous] 按钮可在表中的行之间移动。
![]() |
使用DocCommentXchange 讨论此页。
|
版权 © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |