多个页面引用同一个Html片段(转载)
< script type = "text/javascript" > |
03 |
$("#clickToInsert").click(function() { |
04 |
$.getScript("pages2_2.js", function() { |
05 |
$.get("service.ashx?file=pages2_3.txt", function(data) { |
06 |
$("#placeholder").html(data); |
12 |
< input type = "button" id = "clickToInsert" value = "Insert HTML" /> |
13 |
< div id = "placeholder" > |
< script type = "text/javascript" > |
03 |
$("#clickToInsert").click(function() { |
04 |
$.get("service.ashx?file=pages2_4.txt", function(data) { |
05 |
$("#placeholder").html(data); |
10 |
< input type = "button" id = "clickToInsert" value = "Insert HTML" /> |
11 |
< div id = "placeholder" > |
pages2_4.txt:
01 |
< script src = "pages2_2.js" type = "text/javascript" ></ script > |
02 |
< script type = "text/javascript" > |
05 |
< div id = "complex_page_segment" > |
06 |
< input type = "button" value = "Previous Page" class = "previous" /> |
07 |
< input type = "button" value = "Next Page" class = "next" /> |
转自:
http://www.cnblogs.com/sanshi/archive/2009/08/14/1546317.html
原文地址:https://www.cnblogs.com/johnwonder/p/1742018.html