MyEclipse DeBug對(duì)JS腳本的功能淺析
MyEclipse DeBug對(duì)JS(JavaScript)腳本的功能。
使用JS時(shí),大多用來(lái)操作DOM與DHTML對(duì)象與元素,因此JS運(yùn)行,需要Browser環(huán)境支持。
所以對(duì) .js 文件的調(diào)試,只需將其引入執(zhí)行頁(yè)面中,即可啟動(dòng)MyEclipse DeBug的功能。
例如:
MyEclipse DeBug使用1、rhino.js 文件內(nèi)容如下:
var str = "HelloWorld" ;
alert(str);
MyEclipse DeBug使用2、rhino.html 文件內(nèi)容如下:
- ﹤!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"﹥
- ﹤html﹥
- ﹤head﹥
- ﹤meta http-equiv="Content-Type" content="text/html; charset=UTF-8"﹥
- ﹤title﹥Rhino JavaScript For Java﹤/title﹥
- ﹤script Language="JavaScript" src="rhino.js"﹥﹤/script﹥
- ﹤/head﹥
- ﹤body﹥﹤/body﹥
- ﹤/html﹥
MyEclipse DeBug使用3、點(diǎn)擊 Debug As ﹥﹥ JavaScript Application 進(jìn)入 MyEclipse Web2.0 Browser 視窗
在 Address 欄 輸入 rhino.html 的訪問(wèn)路徑 如:http://localhost:8080/Rhino/rhino.html 即可進(jìn)入MyEclipse DeBug狀態(tài)
【編輯推薦】



















