<script type="text/javascript">
$(function ()
{
var $main = $('#main'),
$1 = $('#1'),
$2 = $('#2');
$2.hide(); // hide div#2 when the page is loaded
$main.click(function ()
{
$1.toggle();
$2.toggle();
});
$senddvd.click(function ()
{
alert('hello');
// a=whichIsVisible();
//alert(a);
});
function whichIsVisible()
{
if (!$1.is(':hidden')) return $1;
if (!$2.is(':hidden')) return $2;
}
});
</script>
Run Code Online (Sandbox Code Playgroud)
点击主要确实似乎不确定为什么它不工作senddvd
<div id="senddvd" align="center"><img border="0" src="images/senddvd.png"></div>
Run Code Online (Sandbox Code Playgroud)
谢谢Prady
我在另一个JPanel中遇到问题.我不知道为什么,但结果是一个简单的方形,但尺寸不正确.这是为什么?
import java.awt.Color;
import java.awt.Container;
import javax.swing.JFrame;
import javax.swing.JPanel;
public class jj extends JFrame {
private JPanel painel3;
private JPanel painel5;
private Container container;
public jj() {
container = getContentPane();
container.setLayout(null);
painel5 = new JPanel();
painel5.setBackground(Color.red);
painel5.setBounds(120, 110, 100, 120);
painel3 = new JPanel();
painel3.setBackground(Color.white);
painel3.add(painel5);
painel3.setBounds(50, 50, 290, 220);
container.add(painel3);
// frame
setSize(1000, 900);
setLocation(200, 50);
setResizable(false);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main(String[] args) {
new jj();
}
}
Run Code Online (Sandbox Code Playgroud) 我是Codeigniter的初学者,想知道我做了一个很好的网络应用程序的巨大知识.请给我一些网站链接(教程)或书籍(网站链接),我抓住以提高我的知识.
对于某人来说,这可能是一个非常简单的问题 - 我可以用来list.files()获取给定目录中的文件列表,但是如果我想获得目录列表,我该怎么做?它在某种程度上就在我面前作为一种选择list.files()吗?
此外,我正在使用Windows,所以如果答案是支持某些Linux/unix命令,那对我来说无效.
.NET例如有一个Directory.GetFiles()方法和一个单独的Directory.GetDirectories()
方法,所以我认为R会有一个类似的对.提前致谢.
在:
#include <string>
void f( char const*, char const* = "" ) {
}
template<class StringType1,class StringType2> inline
void g( StringType1 const &s1, StringType2 const &s2 = "" ) {
f( s1.c_str(), s2.c_str() );
}
template<class StringType> inline
void h( StringType const &s1, StringType const &s2 = "" ) {
f( s1.c_str(), s2.c_str() );
}
int main() {
std::string s;
g( s ); // error: no matching function for call to ‘g(std::string&)’
h( s ); // OK
return 0;
} …Run Code Online (Sandbox Code Playgroud) 参考文献:
我认为首先可以通过了解其工作原理来正确理解传递(例如&$ var).
范围:
PHP非常有趣.:(
我需要对Windows 2008/IIS 7.5服务器做什么才能允许我托管我的新MVC3应用程序.它已经安装了.NET 4.0 Framework ...
我不想使用我在Internet上阅读的/ Bin部署.
谢谢保罗
我正在通过ModelSim运行一些VHDL.每个错误和警告都有自己的错误代码(如下所示:(vcom-1292) Slice range direction "downto" specified in slice with prefix of unknown direction.这只是一个示例消息;我理解它的含义.
我假设Mentor列出了所有可能的错误代码,并详细说明了它们的含义以及如何避免它们.我没有在ModelSim附带的PDF中找到此错误代码,也没有通过Google找到它.有人指点吗?
这是我之前关于如何隐藏继承的构造函数的问题的变体.你如何隐藏继承的方法:
在Delphi允许您构造COM对象的方式之后进行建模:
CoDOMDocument = class
class function Create: IXMLDOMDocument2;
end;
Run Code Online (Sandbox Code Playgroud)
我有一个工厂,创建一个实现接口的对象:
CoCondition = class
public
class function Create: ICondition;
end;
Run Code Online (Sandbox Code Playgroud)
这很好用.虽然在祖先中有一种叫做方法,但它工作正常Create.它的工作原理是因为我没有overload关键字存在.只要我添加overload关键字:Delphi将允许继承的Create方法"闪耀":
CoCondition = class
public
class function Create: ICondition; overload;
end;
Run Code Online (Sandbox Code Playgroud)
所以现在CoCondition有两种Create方法可用:
class function CoCondition.Create: ICondition;
constructor TObject.Create;
Run Code Online (Sandbox Code Playgroud)
你要打电话给哪一个是模棱两可的.修复,显然是没有overload关键字(为什么你,你没有重载任何东西?).好吧,事实证明我正在超载的东西:
CoCondition = class
public
class function Create: ICondition; overload;
class function Create(const ConditionType: TConditionType): ICondition; overload;
class function Create(const PropertyName: string; …Run Code Online (Sandbox Code Playgroud)