在flextpaper中,我想使用API的左右按钮显示下一页和上一页


In flexpaper I want to show next and previous page using right and left button using its API

我正在使用这个按钮使用onclick

<input type="submit" value="Invoke" onclick="getDocViewer().nextPage()">
<input type="submit" value="Invoke" onclick="getDocViewer().prevPage()">

但它引发错误"无法调用未定义"的方法"getApi"

我该怎么解决这个问题?

<input type=submit value="Invoke" 
       onclick="$FlexPaper('id_of_the_documentViewer_element').nextPage()">
<input type=submit value="Invoke" 
       onclick="$FlexPaper('id_of_the_documentViewer_element').prevPage()">