- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我在我的应用中显示了一个确认框。当用户点击 Okay
时,我关闭窗口
当用户点击 Cancel
时,我只想停留在同一页面上。
我应该写什么来代替 DO_NOTHING?
<a href="#" onclick="confirm('Do you wan to close the application ?')?window.close():DO_NOTHING')">Close the application ?</a>
如果我把它留空,它就不起作用。如果我写任何随机字符串,它可以工作,但会显示 string undefined
错误。
最佳答案
尝试使用 void(0)
<a href="#" onclick="confirm('Do you wan to close the application ?')?window.close():void(0)')">Close the application ?</a>
关于javascript - 如何在 JavaScript 中定义 DO NOTHING,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6424094/
这里有没有人使用 VB.NET 并且强烈偏好或反对使用 Not foo Is Nothing而不是 foo IsNot Nothing ?如果是这样,为什么? 例如 If var1 IsNot Not
我刚开始使用 git,我有点困惑。我想要做的是为特定项目文件夹设置一个新的存储库。我的第一个问题是我究竟需要在终端、桌面或文件夹本身的什么地方进行文件初始化来初始化文件。我尝试导航到实际文件夹并输入
在VB中是否有任何情况x = Nothing与 x is Nothing 不一样? 另外,x <> Nothing对比 x IsNot Nothing 我认为它们完全相同..但只是想确定一下。 最佳答
我们在 VB.Net 中有几个项目,使用 .Net Framework 4 和 Linq to Entities 来处理我们的许多 SQL 查询。迁移到 EF 对我们来说是一个新的转变(已经使用了大约
似乎我理解错了,但我尝试了以下方法: GHCi, version 8.6.5 Nothing == Nothing => True Nothing == (pure Nothing) => False
在我的程序中,我想用 Nothing 初始化一堆矩阵,然后如果满足某些条件,将单个元素更改为 Bool 类型的值或 String 这在我初始化时工作正常 Array{Union{Nothing,Boo
我有以下代码,无法编译: object PcpProtocol { private type PcpKV = String private val findPublicKey: List[Pc
在 VB.NET , 有什么区别 if foo is Nothing Then doStuff() End If 和 if foo=Nothing Then doStuff() E
我试图在现有字典的第二层实例化一个空字典,然后为其分配一个键值对,但 MyPy 抛出错误。 这是一个最小的示例,它将在激活 MyPy 检查时重现它: result = {"Test": "someth
我正在将一个最初用 Java 编写的 Android 应用程序转换为 Kotlin。我很难理解以下错误消息: Type mismatch.Required:MenuSlidingTabStrip.On
我有: Dim nVar1 As Long? Dim nVar2 As Long? Dim nVarSum As Long? nVar1 = Nothing nVar2 = 5 nVarSum = n
我正在构建一个控制 git 存储库的 PHP 应用程序。我有一个执行命令 git status 的同步函数,虽然没有返回“你的分支是最新的”,但可能会提前采取必要的行动,比如远程或本地分支。 我还构建
我如何确定一个 perl 函数返回 nothing 甚至 undef? 例子: sub test { return; } 或 sub test {} 问题是好奇的代理函数也可以返回字符串、列表…
我希望 vim 在没有打开或创建文件时打开 :Explorer。例如。当我打电话时vim没有任何选择。 调用 vim newfile.txt尽管如此,仍然应该以正常方式行事。 我该怎么做呢?我似乎找不
我知道 Scala Nothing 是底层类型。当我看到 API 时,它从层次结构中的顶部的“Any”扩展而来。 现在既然Scala不支持多重继承,怎么能说是底层类型呢?换句话说,它没有直接继承所有的
我正在尝试检查“Listivew.Tag 属性是否为空”。 我过去常常对所有场景进行“什么都没有”检查作为第一次检查以避免错误 有人可以解释如何在 VB 6 中做到这一点吗? If Not .lvw
我有一对看起来像这样的类(class)。有一个 Generator根据一些类级别的值生成一个值,和一个 GeneratorFactory构造一个 Generator . case class Gene
这是我去年遇到的事情,SO 似乎是记录它的好地方:) 问:从 Delphi 自动化 Excel (/Word/...) 时,如何检查 Excel 函数是否返回变体 Nothing(如 VBA 中的调用
给定一个多态性状 trait Transform[T] { def apply( t: T ) : T } 人们可能喜欢实现各种专门的实例,例如 case class Add[Double] ex
这个问题已经有答案了: Java do nothing (6 个回答) Empty if-statements [duplicate] (9 个回答) 已关闭 4 年前。 我正在编写一个 if-els
我是一名优秀的程序员,十分优秀!