大家好,我们需要帮助才能根据第1页上的按钮点击第2页 fundemo()调用该功能js 获得批准
Page1.html
<script>
$.getScript(path + "js/Page1.js");
</script>
<p id="currentPage"> </p>
<div class="hr">
<input type="button" id="hr" class="appButton" value="HR" onclick="funchr();" />
<input type="button" id="crm" class="appButton" value="CRM" onclick="funccrm();"/>
</div>
<div id="show1" style="display:none;">
<input type="text" id="searchcustom">
<input type="submit" id="sebutton" value="search" onclick="fus();">
</div>
<div id="placehere">
</div>
<ul id="page1display"> </ul>
<div class="empl"> <ul id="mydemo1"> </ul> </div>
<ul id="empdetdemo"> </ul>
<input type="button" id="backButtonPage1" class="backbutton" value="BACK" onclick="currentPage.back();" />
&#13;
Page2.html
<script>
$.getScript(path + "js/Page2.js");
</script>
<p id="currentPage"> </p>
&#13;
Page2.js
currentPage={};
currentPage.init = function() {
WL.Logger.debug("Page2 :: init");
};
currentPage.back = function(){
WL.Logger.debug("Page2 :: back");
$("#pagePort").load(pagesHistory.pop());
};
function fundemo()
{
alert("HAI");
}
&#13;
Page1.js
currentPage={};
currentPage.init = function() {
WL.Logger.debug("Page1 :: init");
};
currentPage.back = function(){
WL.Logger.debug("Page1 :: back");
$("#pagePort").load(pagesHistory.pop());
};
function funccrm()
{
$("#pagePort").load(path + "pages/Page3.html");
}
function funchr()
{ $( ".hr" ).remove();
if(person_role == "Y")
{
var btn = document.createElement("BUTTON");
var t = document.createTextNode("ABSENCE APPROVAL");
btn.appendChild(t);
btn.setAttribute("id","absapr");
document.body.appendChild(btn);
}
$('#absapr').click(function(){
$("#pagePort").load(path + "pages/Page2.html");
}
&#13;