发布网友 发布时间:2023-12-04 10:57
共1个回答
热心网友 时间:2024-12-04 04:53
VBSCRIPT代码: <SCRIPT LANGUAGE="VBSCRIPT"> FUNCTION WORD_ONCLICK() SET MYDOCAPP = CREATEOBJECT("WORD.APPLICATION") MYDOCAPP.VISIBLE = TRUE MYDOCAPP.ACTIVATE SET MYDOC = MYDOCAPP.DOCUMENTS.OPEN("http://LOCALHOST/TEST/TEST.DOC") STR = WORD_PROC.TEXTAREA.VALUE MYDOC.FORMFIELDS("TEST").RANGE = STR END FUNCTION </SCRIPT> JAVASCRIPT代码: <SCRIPT LANGUAGE="JAVASCRIPT"> FUNCTION WORD_ONCLICK() { VAR MYDOCAPP =NEW ACTIVEXOBJECT("WORD.APPLICATION"); MYDOCAPP.VISIBLE = TRUE; MYDOCAPP.ACTIVATE(); VAR MYDOC = MYDOCAPP.DOCUMENTS.OPEN("http://LOCALHOST/TEST/TEST.DOC"); VAR STR = WORD_PROC.TEXTAREA.VALUE; MYDOC.FORMFIELDS("TEST").RANGE = STR; } </SCRIPT>