好的,所以我试图学习如何使用多个构造函数,并且不能完全理解为什么调用这些不同的方法不起作用 - 实际上第一个方法不会编译.
谢谢你的关注...
// Compile error here. I'm trying to call the 2nd Counter method with default values.
public void Counter() {
this.Counter(0, false);
}
// Here I'm trying to enable a call to the Counter method with integer and boolean attributes in its call.
public Counter(int startingValue, boolean check) {
this.startingValue = startingValue;
this.check = check;
}
Run Code Online (Sandbox Code Playgroud) 我正在动态地将内容加载到div(可以正常工作)但是无法使用加载的内容的JavaScript.
这是我从可点击的无序列表项调用的加载代码:
<div id="resources" class="tabcontent">
<script>
$("#resources").load("pages/resources.html");
</script>
</div>
Run Code Online (Sandbox Code Playgroud)
一旦加载了pages/resources.html,就会在其中加入一堆类似的JavaScript,将更多的HTML页面加载到该页面内的div中.