Warning: Declaration of PDbMySQLDriver::getDriverDataDictionary() should be compatible with & PDbDriverBase::getDriverDataDictionary($driverName) in /var/www/html/lf/class/database/pdb/drivers/pdbmysqldriver.class.php on line 157

Warning: Declaration of PatternLayout::format(&$message) should be compatible with & Layout::format(&$message) in /var/www/html/lf/class/logger/layout/patternlayout.class.php on line 119

Warning: Declaration of UserStatus::getStatusList($includeStatusAll = false) should be compatible with GenericStatusList::getStatusList($prefix, $statusAllId, $includeStatusAll = false) in /var/www/html/lf/class/dao/userstatus.class.php on line 27

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/integervalidator.class.php on line 30

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/integervalidator.class.php on line 30

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/blognamevalidator.class.php on line 27

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/blognamevalidator.class.php on line 28

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/blognamevalidator.class.php on line 34

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/usernamevalidator.class.php on line 32

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/usernamevalidator.class.php on line 33

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/usernamevalidator.class.php on line 34

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/usernamevalidator.class.php on line 38

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/domainvalidator.class.php on line 26

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/domainvalidator.class.php on line 27

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/domainvalidator.class.php on line 31

Warning: Declaration of BlogStatus::getStatusList($includeStatusAll = false) should be compatible with GenericStatusList::getStatusList($prefix, $statusAllId, $includeStatusAll = false) in /var/www/html/lf/class/dao/blogstatus.class.php on line 27

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/integervalidator.class.php on line 30

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/integervalidator.class.php on line 30

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/integervalidator.class.php on line 30

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/stringvalidator.class.php on line 20

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/stringvalidator.class.php on line 23

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/integervalidator.class.php on line 30

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/stringvalidator.class.php on line 20

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/stringvalidator.class.php on line 23

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/integervalidator.class.php on line 30

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/usernamevalidator.class.php on line 32

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/usernamevalidator.class.php on line 33

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/usernamevalidator.class.php on line 34

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/usernamevalidator.class.php on line 38

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/integervalidator.class.php on line 30

Warning: Declaration of Template::display() should be compatible with Smarty::display($resource_name, $cache_id = NULL, $compile_id = NULL) in /var/www/html/lf/class/template/template.class.php on line 226

Warning: Declaration of Template::fetch() should be compatible with Smarty::fetch($resource_name, $cache_id = NULL, $compile_id = NULL, $display = false) in /var/www/html/lf/class/template/template.class.php on line 215

Notice: Only variables should be passed by reference in /var/www/html/lf/class/data/validator/integervalidator.class.php on line 30

Warning: Declaration of ArticleStatus::getStatusList($includeStatusAll = false) should be compatible with GenericStatusList::getStatusList($prefix, $statusAllId, $includeStatusAll = false) in /var/www/html/lf/class/dao/articlestatus.class.php on line 33

Warning: Declaration of ArticleCommentStatus::getStatusList($includeStatusAll = false) should be compatible with GenericStatusList::getStatusList($prefix, $statusAllId, $includeStatusAll = false) in /var/www/html/lf/class/dao/articlecommentstatus.class.php on line 28

Warning: Declaration of CachedTemplate::fetch($cacheId) should be compatible with Template::fetch() in /var/www/html/lf/class/template/cachedtemplate.class.php on line 41

Warning: Declaration of CachedTemplate::display($cacheId) should be compatible with Template::display() in /var/www/html/lf/class/template/cachedtemplate.class.php on line 75

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/lf/class/data/validator/stringvalidator.class.php:20) in /var/www/html/lf/class/view/view.class.php on line 328

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/lf/class/data/validator/stringvalidator.class.php:20) in /var/www/html/lf/class/view/view.class.php on line 175

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/lf/class/data/validator/stringvalidator.class.php:20) in /var/www/html/lf/class/view/smartyview.class.php on line 245
20191216在jsbin.com網站編寫JavaScript程式將結果抓入writer再轉存為pdf再上傳至「金門農工學生學習歷程系統」成IT學習檔案 | 樹心幽徑

樹心幽徑

« 20191125用DEV-C++設計各式資料型態的陣列 | Main | 20191201安裝新酷音及蝦米輸入法並在各式軟體使用新裝的中文輸入法 »

20191216在jsbin.com網站編寫JavaScript程式將結果抓入writer再轉存為pdf再上傳至「金門農工學生學習歷程系統」成IT學習檔案
2019/12/01,10:17

 

 

 

(1)連上 https://jsbin.com/

(2)將AUTO-RUN JS的勾選取消

(3-1)點選JavaScript鈕並編寫如下程式:

var n=10;

var s=1;

for (i=1;i<=n;i++) { s=s*i; }

alert("n!=" + s );

(3-2)按RUN WITH JS鈕執行結果如下:

alt

(4-1)將(3-1)的JS程式改寫如下:

var n=100;

var s=0;

for (i=1;i<=n;i=i+2) { s=s+i; }

alert("1+3+5+...+n=" + s );

(4-2)按RUN WITH JS鈕執行結果如下:

1+3+5+...+n=2500

(5)請把(3)及(4)所寫的程式碼及執行結果畫面用fn+ALT+PRTSCR鍵抓入LibreOffice 的writer中並存為「20191216你名你號js程式.odt」並匯出產生PDF檔(檔名為:20191216你名你號js程式.pdf),請參考如下:

20191217汽車一吳小花48號 JS程式設計.odt下載 (205 KB)

20191217汽車一吳小花48號 JS程式設計.pdf下載 (161 KB)

 

(6)請把(5)所產生的PDF檔上傳至「金門農工學生學習歷程系統」成為你的IT學習檔案。

 

(7) NOTEPAD編寫 js1.HTM 如下並用FIREFOX開啟之並抓入如下執行結果及程式碼來更新你的ODT及pdf及學習檔:

<script>

var n=100;

var s=0;

for (i=1;i<=n;i=i+2) { s=s+i; }

alert("1+3+5+...+n=" + s );

</script>

 

 

迴響

 
Accessible and Valid XHTML 1.0 Strict and CSS Powered by LifeType