dreamweaver基础教程—使用dreamweaver开发javascript脚本

dreamweaver基础教程—使用dreamweaver开发javascript脚本

ID:33725404

大小:1.83 MB

页数:18页

时间:2019-02-28

dreamweaver基础教程—使用dreamweaver开发javascript脚本_第1页
dreamweaver基础教程—使用dreamweaver开发javascript脚本_第2页
dreamweaver基础教程—使用dreamweaver开发javascript脚本_第3页
dreamweaver基础教程—使用dreamweaver开发javascript脚本_第4页
dreamweaver基础教程—使用dreamweaver开发javascript脚本_第5页
资源描述:

《dreamweaver基础教程—使用dreamweaver开发javascript脚本》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、使用Dreamweaver开发JavaScript脚本使用Dreamweaver开发JavaScript脚本我们已经介绍过Web 前端设计的逻辑层概念,它主要集中在JavaScript技术上。相对于HTML和CSS技术的完美支持,Dreamweaver 对于JavaScript技术的支持可以说是姗姗来迟,且比较有限。早期的Dreamweaver 使用“行为”概念打包常用的JavaScript功能块,而对于JavaScript语言本身的支持基本上没有,仅能够分色显示JavaScript关键字。从Dreamweaver CS3 版本开始,Adobe

2、把过多的精力集中在Ajax框架的开发上,忽略了基础性技术支持。而Dreamweaver 所开发的Spry框架虽然功能很强大,但是却无法与jQuery、Prototype等基础性Ajax 框架相比较。用Adobe官方解释,Spry技术是为Web设计师开发的Ajax框架,而不是为Web程序员开发的基础性架构,但是它与ExtJS和YUI等框架相比,界面效果和交互性功能方面又显得比较粗糙和弱小。升级到Dreamweaver CS4版本后,Adobe开始把精力放在JavaScript核心技术支持上,现在能够支持JavaScript代码核心智能提示,并提供

3、了几个实用工具。坦率地讲,Dreamweaver 不是开发JavaScript的最佳工具,但是作为一款Web 综合编辑环境,对于广大初学者来说仍然是首选工具,如果结合Dreamweaver 所附带的Spry技术框架,相信你能够轻松设计各种常用脚本功能。本章将详细讲解Dreamweaver 如何支持JavaScript技术,其中包括脚本服务、行为和Spry技术框架。1Dreamweaver中的JavaScript在Dreamweaver CS4版本之前,Dreamweaver 仅能够支持JavaScript代码的分色显示,且功能有限。升级到Dre

4、amweaver CS4版本后,Adobe开始意识到JavaScript在Web开发中的重要性,并加大了对其基础性技术的支持,这主要包括三个方面的支持服务。1.1 结构和逻辑的分离在Web 开发中,用户常常在页面内直接编写JavaScript脚本,有时甚至把JavaScript函数以属性事件的形式绑到标签中,这样做不符合标准设计的规范(即倡导结构、表现和逻辑的分离),同时也不便于JavaScript脚本管理和利用率,因此建议读者应养成在外部文件中开发JavaScript脚本并在外部文件中注册事件处理函数的习惯。Dreamweaver 考虑到部分

5、用户已经形成的习惯,提供了将JavaScript外置的工具。例如,在下面这个简单文档中,我们在头部区域定义一个JavaScript函数,然后在超链接中绑定该函数到onclick属性上,当单击超链接时,会自动触发函数,弹出一个提示信息对话框。569网页制作与网站开发从入门到精通  分离结构和逻辑</titl</p><p>6、e><script type="text/javascript" language="javascript">function hello(){alert("Hello,World!"); return false;}</script></head><body> <ahref="#"onclick="hello();">Hello World</a> </body></html>这种把HTML和JavaScript混在一起编写的方法显然不符合标准设计的原则。Dreamweaver 提供了一个简单的工具,它能够把HTML文档中的JavaScrip</p><p>7、t代码自动放置在独立的JS文件中,实现结构和逻辑的分离。例如,针对上面示例,在Dreamweaver 中选择【命令】</p><p>8、【将JavaScript外置】命令,打开【将JavaScript外置】对话框,如图1 所示。该对话框有两个选项:一个是【仅将JavaScript外置】单选按钮,它能够把文档内包含的脚本放置到外部文件中,并引入该文件。例如,在上面示例中,可以把<script>标签包含的脚本转移到同名js文件中,并使用如下标签导入外部js文件。<script src="222.js" type="text/javascript"></script></p><p style="height:0px;padding:0;margin:0;overflow:hidden">9、另一个是【将JavaScript外置并以非侵入方式进行附加】单选按钮,该单选按钮除了能够把文档内包含的JavaScript脚本外置之外,还可以把标签内</p> </div> <div class="mt-3 bg-white"> <div class="d-lg-block d-none px-3 px-lg-4 py-3 border-bottom text-center font-18"> 当前文档最多预览五页,下载文档查看全文 </div> <div class="detail-fixed-feature d-none d-lg-block" id="detailFixedFeatureBox"> <div class="px-3 px-lg-4 py-3 d-flex align-items-center justify-content-between fixed-feature-box" id="detailFixedFeature"> <div class="d-lg-flex d-none align-items-center"> <div> <a class="btn btn-outline-danger article-state" href="javascript:;" data-id="33725404" data-code="438274" data-title="dreamweaver基础教程—使用dreamweaver开发javascript脚本"> <span>侵权申诉</span> </a> <button type="button" class="btn btn-outline-secondary with-light ml-2" data-toggle="modal" data-target="#reportModal" data-id="33725404"><span>举报</span></button> </div> <nav class="d-flex align-items-center ml-4" id="anchorPoint"> <a href="javascript:;" class="btn btn-light anchor-pre px-2"><i class="iconfont text-muted"></i></a> <div class="text-muted mb-0 pre-point-list" id="prePointList"> <a class="px-2 active nav-link" href="#anchorImg0">1</a> <a class="px-2 nav-link" href="#anchorImg1">1</a> <a class="px-2 nav-link" href="#anchorImg2">2</a> <a class="px-2 nav-link" href="#anchorImg3">3</a> <a class="px-2 nav-link" href="#anchorImg4">4</a> <a class="px-2 nav-link" href="#anchorImg5">5</a> / <span class="px-2" id="prePageNums">18</span> </div> <a href="javascript:;" class="btn btn-light anchor-next px-2"><i class="iconfont text-muted"></i></a> </nav> </div> <div class="d-flex align-items-center"> <p class="d-lg-block d-none font-14 text-black-50 mb-0 mr-2">此文档下载收益归作者所有</p> <button class="btn btn-danger detail-download-btn px-3 ml-0 font-16" data-btn="downloadfile" style="width:128px;height:40px;" data-id="33725404" data-price="1800" data-size="1.83 MB" data-page="18页" data-type="pdf" data-binddown="true" data-isold="new_content" data-vip="0" data-title="dreamweaver基础教程—使用dreamweaver开发javascript脚本">下载文档</button> </div> </div> </div> </div> <div class="d-block d-lg-none px-3 px-lg-4 py-3 border-bottom text-center font-14" style="color:#999">当前文档最多预览五页,下载文档查看全文</div> <button class="btn d-block w-100 d-lg-none btn-danger detail-download-btn px-3 ml-0 font-16" data-btn="downloadfile" data-id="33725404" data-price="1800" data-size="1.83 MB" data-page="18页" data-type="pdf" data-binddown="true" data-isold="new_content" data-vip="0" data-title="dreamweaver基础教程—使用dreamweaver开发javascript脚本">点击下载本文档 </button> </div> <div class="px-3 px-lg-4 py-3 bg-white mt-3"> <ul class="nav custom-tab border-bottom" id="myTab" role="tablist"> <li class="nav-item" role="presentation"> <a class="nav-link active px-0 mr-4 font-16 font-weight-light pb-3" id="tips-tab" data-toggle="tab" href="#showTips" role="tab" aria-controls="showTips" aria-selected="true">版权提示</a> </li> <li class="nav-item" role="presentation"> <a class="nav-link px-0 pb-3 font-16 font-weight-light text-black-50" href="/d-33725404.html" >下载文档</a> </li> <dl class="flex-grow-1 mb-0 d-lg-none"> <li class="ml-3 float-right d-lg-none"> <button type="button" class="btn btn-light" data-toggle="modal" data-target="#reportModal" data-id="33725404"><span>举报</span></button> </li> </dl> </ul> <div class="tab-content with-content pt-3" id="myTabContent"> <div class="tab-pane fade show active font-14" id="showTips" role="tabpanel" aria-labelledby="showTips-tab"> 温馨提示: <br> 1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。<br> 2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。<br> 3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。<br> 4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。 <br> </div> </div> </div> </div> <div class="detail-sidebar d-none d-lg-block"> <div id="columnDetailSiderRight"> <div class="detail-yourlike mt-0 pb-2" id="relativeArticle"> <div class="border-bottom py-2 d-flex align-items-center justify-content-between"> <h5 class="font-16">相关文章</h5> <a class="font-14 hover-letter-spacing" href="/ucenter/search/index.html?text=dreamweaver基础教程—使用dreamweaver开发javascript脚本" target="_blank" rel="nofollow">更多<i class="iconfont font-12 pl-1"></i></a> </div> <ul class="font-14 like-list"> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-pdf" href="/p-4121685.html" title="dreamweaver使用javascript行为" target="_blank"><span class="text-danger">d</span><span class="text-danger">r</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">m</span><span class="text-danger">w</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">v</span><span class="text-danger">e</span><span class="text-danger">r</span><span class="text-danger">使</span><span class="text-danger">用</span><span class="text-danger">j</span><span class="text-danger">a</span><span class="text-danger">v</span><span class="text-danger">a</span><span class="text-danger">s</span><span class="text-danger">c</span><span class="text-danger">r</span><span class="text-danger">i</span><span class="text-danger">p</span><span class="text-danger">t</span>行为</a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-pdf" href="/p-5264728.html" title="dreamweaver基础教程—使用dreamweaver设计css样式" target="_blank"><span class="text-danger">d</span><span class="text-danger">r</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">m</span><span class="text-danger">w</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">v</span><span class="text-danger">e</span><span class="text-danger">r</span><span class="text-danger">基</span><span class="text-danger">础</span><span class="text-danger">教</span><span class="text-danger">程</span><span class="text-danger">—</span><span class="text-danger">使</span><span class="text-danger">用</span><span class="text-danger">d</span><span class="text-danger">r</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">m</span><span class="text-danger">w</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">v</span><span class="text-danger">e</span><span class="text-danger">r</span>设计<span class="text-danger">c</span><span class="text-danger">s</span><span class="text-danger">s</span>样式</a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-pdf" href="/p-5337058.html" title="dreamweaver基础教程—使用dreamweaver设计css样式" target="_blank"><span class="text-danger">d</span><span class="text-danger">r</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">m</span><span class="text-danger">w</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">v</span><span class="text-danger">e</span><span class="text-danger">r</span><span class="text-danger">基</span><span class="text-danger">础</span><span class="text-danger">教</span><span class="text-danger">程</span><span class="text-danger">—</span><span class="text-danger">使</span><span class="text-danger">用</span><span class="text-danger">d</span><span class="text-danger">r</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">m</span><span class="text-danger">w</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">v</span><span class="text-danger">e</span><span class="text-danger">r</span>设计<span class="text-danger">c</span><span class="text-danger">s</span><span class="text-danger">s</span>样式</a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-pdf" href="/p-5378043.html" title="dreamweaver基础教程—使用dreamweaver设计css样式" target="_blank"><span class="text-danger">d</span><span class="text-danger">r</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">m</span><span class="text-danger">w</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">v</span><span class="text-danger">e</span><span class="text-danger">r</span><span class="text-danger">基</span><span class="text-danger">础</span><span class="text-danger">教</span><span class="text-danger">程</span><span class="text-danger">—</span><span class="text-danger">使</span><span class="text-danger">用</span><span class="text-danger">d</span><span class="text-danger">r</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">m</span><span class="text-danger">w</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">v</span><span class="text-danger">e</span><span class="text-danger">r</span>设计<span class="text-danger">c</span><span class="text-danger">s</span><span class="text-danger">s</span>样式</a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-pdf" href="/p-8086469.html" title="使用 dreamweaver mx" target="_blank"><span class="text-danger">使</span><span class="text-danger">用</span><span class="text-danger">d</span><span class="text-danger">r</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">m</span><span class="text-danger">w</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">v</span><span class="text-danger">e</span><span class="text-danger">r</span><span class="text-danger">m</span>x</a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-doc" href="/p-26465139.html" title="dreamweaver基础教程25210" target="_blank"><span class="text-danger">d</span><span class="text-danger">r</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">m</span><span class="text-danger">w</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">v</span><span class="text-danger">e</span><span class="text-danger">r</span><span class="text-danger">基</span><span class="text-danger">础</span><span class="text-danger">教</span><span class="text-danger">程</span>25210</a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-doc" href="/p-27432196.html" title="dreamweaver基础教程" target="_blank"><span class="text-danger">d</span><span class="text-danger">r</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">m</span><span class="text-danger">w</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">v</span><span class="text-danger">e</span><span class="text-danger">r</span><span class="text-danger">基</span><span class="text-danger">础</span><span class="text-danger">教</span><span class="text-danger">程</span></a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-pdf" href="/p-33778420.html" title="dreamweaver基础教程—使用dreamweaver构建html结构" target="_blank"><span class="text-danger">d</span><span class="text-danger">r</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">m</span><span class="text-danger">w</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">v</span><span class="text-danger">e</span><span class="text-danger">r</span><span class="text-danger">基</span><span class="text-danger">础</span><span class="text-danger">教</span><span class="text-danger">程</span><span class="text-danger">—</span><span class="text-danger">使</span><span class="text-danger">用</span><span class="text-danger">d</span><span class="text-danger">r</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">m</span><span class="text-danger">w</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">v</span><span class="text-danger">e</span><span class="text-danger">r</span>构建h<span class="text-danger">t</span><span class="text-danger">m</span>l结构</a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-pptx" href="/p-39270939.html" title="使用Dreamweaver开发JavaScript脚本" target="_blank"><span class="text-danger">使</span><span class="text-danger">用</span>D<span class="text-danger">r</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">m</span><span class="text-danger">w</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">v</span><span class="text-danger">e</span><span class="text-danger">r</span><span class="text-danger">开</span><span class="text-danger">发</span>J<span class="text-danger">a</span><span class="text-danger">v</span><span class="text-danger">a</span>S<span class="text-danger">c</span><span class="text-danger">r</span><span class="text-danger">i</span><span class="text-danger">p</span><span class="text-danger">t</span><span class="text-danger">脚</span><span class="text-danger">本</span></a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-ppt" href="/p-43345344.html" title="Dreamweaver使用基础" target="_blank">D<span class="text-danger">r</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">m</span><span class="text-danger">w</span><span class="text-danger">e</span><span class="text-danger">a</span><span class="text-danger">v</span><span class="text-danger">e</span><span class="text-danger">r</span><span class="text-danger">使</span><span class="text-danger">用</span><span class="text-danger">基</span><span class="text-danger">础</span></a> </li> </ul> </div> <div class="detail-yourlike pb-2"> <div class="border-bottom py-2"> <h5 class="font-16">相关标签</h5> </div> <ul class="font-14 like-list d-flex flex-wrap"> <a class="search-tag" href="/tags/913002/" target="_blank">基础教程</a> <a class="search-tag" href="/tags/14/" target="_blank">javascript</a> <a class="search-tag" href="/tags/1271697/" target="_blank">脚本</a> <a class="search-tag" href="/tags/540156/" target="_blank">开发</a> <a class="search-tag" href="/tags/540625/" target="_blank">使用</a> </ul> </div> <script src="/d/js/acmsd/thea1.js"></script> </div> </div> </div> <footer> <div class="container d-none d-lg-block mb-4"> <div class="d-flex justify-content-between footer-nav"> <ul class="d-flex foot-nav"> <li> <h5>常见问题</h5> <a class=text-decoration-none href=/help/wenti/upload/ target=_blank> 关于上传 </a><a class=text-decoration-none href=/help/wenti/xiazai/ target=_blank> 关于下载 </a><a class=text-decoration-none href=/help/wenti/qinquan/ target=_blank> 关于侵权 </a><a class=text-decoration-none href=/help/wenti/fenxaing/ target=_blank> 分享文档赚钱教程 </a> </li> <li> <h5>关于我们</h5> <a class=text-decoration-none href=/help/about/wzjs/ target=_blank> 网站介绍 </a><a class=text-decoration-none href=/help/about/gywm/ target=_blank> 关于我们 </a><a class=text-decoration-none href=/help/about/lxwm/ target=_blank> 联系我们 </a> </li> <li> <h5>版权问题</h5> <a class=text-decoration-none href=/help/banquan/bqsm/ target=_blank> 版权声明 </a><a class=text-decoration-none href=/help/banquan/qqcl/ target=_blank> 侵权处理 </a><a class=text-decoration-none href=/help/banquan/mzsm/ target=_blank> 免责声明 </a> </li> <li> <h5>协议条款</h5> <a class=text-decoration-none href=/help/xieyi/yhxy/ target=_blank> 用户协议 </a><a class=text-decoration-none href=/help/xieyi/fwtk/ target=_blank> 用户服务条款 </a><a class=text-decoration-none href=/help/xieyi/ysbh/ target=_blank> 用户隐私保护 </a> </li> <li> <h5>网站导航</h5> <a class="text-decoration-none help-nav-item" href="/sitemaps.xml" data-name="网站地图" target="_blank">网站地图</a> <a class="text-decoration-none help-nav-item" href="/list.html" data-name="全部分类" target="_blank">全部分类</a> <a class="text-decoration-none help-nav-item" href="/sitemaps/index.html" data-name="资源地图" target="_blank">资源地图</a> </li> </ul> <div class="foot-qrcode d-flex"> <div> <div class="subsitute-bg"><img src="https://www.wenku365.com/d/file/2022/07-08/f23df57d987ef7ad9acb33fe5abf9854.jpg"></div> <p>关注公众号<br></p> </div> </div> </div> </div> <div class="footer-copyright"> <p><a href="/" target="_blank">天天文库</a>站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有【成交的100%(原创)】。</p> <p>本站是网络服务平台方,若您的权利被侵害,侵权客服QQ:3074922707 欢迎举报。</p> <p>Copyright 2004-2021 <a href="https://www.wenku365.com/" target="_blank">wenku365.com</a> All Rights Reserved <a href="https://beian.miit.gov.cn/#/Integrated/index" rel="nofollow" target="_blank">闽ICP备15016911号-5 </a></p> <p>闽公网安备 <a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=35052402000320" rel="nofollow" target="_blank">35052402000320</a></p> <p> <a href="https://www.wenku365.com/zt.html" target="_blank">专题文集</a> <a href="https://www.wenku365.com/zt-90007.html" target="_blank">丨职业培训</a> <a href="https://www.wenku365.com/zt-90005.html" target="_blank">丨实用范文</a> <a href="https://www.wenku365.com/zt-90010.html" target="_blank">丨商业材料</a> <a href="https://www.wenku365.com/zt-90013.html" target="_blank">丨合同协议</a> <a href="https://www.wenku365.com/zt-90009.html" target="_blank">丨PPT专题</a></p> </div> </footer> <script src="//static.wenku365.com/wenku365/js/global.min.js?"></script> <script src="//static.wenku365.com/wenku365/js/clipboard.min.js?"></script> <script src="//static.wenku365.com/wenku365/js/jquery.treeview.js?"></script> <script src="//static.wenku365.com/wenku365/js/jquery.share.min.js?"></script> <script src="//static.wenku365.com/wenku365/js/common.min.js?"></script> <script src="//static.wenku365.com/wenku365/js/downloadFile.js?"></script> <script src="//static.wenku365.com/wenku365/js/loginWindow.js?"></script> <script src="//static.wenku365.com/wenku365/js/windowRecharge.js?"></script> <script src="//static.wenku365.com/wenku365/js/viewer.min.js?"></script> <script src="//static.wenku365.com/wenku365/js/detail.js?"></script> <!-- 2023-05-07 05:51:57 --> </body> </html>