如何获取html,css和javascript的来源以及网页的特定部分

时间:2015-09-02 00:44:57

标签: javascript html css

我正在尝试使用我购买的模板中的按钮和弹出窗口。我有所有来源。

html看起来像这样:

<div class="panel panel-default">
                    <div class="panel-body">
                          <div class="col-md-6">
                              <p>Have a question about this?  </p>
                          </div>
                          <div class="col-md-6">
                               <button data-toggle="tk-modal-demo" data-modal-options="slide-up" class="btn btn-warning">Ask Question</button>
                          </div>
                   </div>
                  </div>

  <!-- Inline Script for colors and config objects; used by various external scripts; -->
  <script id="tk-modal-demo" type="text/x-handlebars-template">
                            <div class="modal fade{{#if modalOptions}} {{ modalOptions }}{{/if}}" id="{{ id }}">
                            <div class="modal-dialog{{#if dialogOptions}} {{ dialogOptions }}{{/if}}">
                            <div class="v-cell">
                            <div class="modal-content{{#if contentOptions}} {{ contentOptions }}{{/if}}">
                            <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
                            </button>
                            <h4 class="modal-title">Equipment Check In</h4>
                            </div>
                            <div class="modal-body">
                            Are you certain that you want to check in this piece of equipment?  Please confirm Yes or No below.
                            </div>
                            <div class="modal-footer">


                            <button type="button" class="btn btn-primary" data-dismiss="modal">No</button>
                            <a class="btn btn-primary" href="az-release-equipment.html">Yes </i></a>
                            </div>
                            </div>
                            </div>
                            </div>
                            </div>
                        </script>

问题是有10个css文件甚至更多的js文件都很大。

我不想仅仅为了弹出功能而将所有这些内容都包含在我的网站中。

有没有办法只获得这个html片段的css和javascript,而不是使用超过20个文件,总大小为10mb?

1 个答案:

答案 0 :(得分:0)

感谢Jack Pattishall的评论。这个chrome插件可以解决问题:http://blogs.msdn.com/b/microsoft_student_developer_blog/