本文整理汇总了C++中HTMLInputElement::click方法的典型用法代码示例。如果您正苦于以下问题:C++ HTMLInputElement::click方法的具体用法?C++ HTMLInputElement::click怎么用?C++ HTMLInputElement::click使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLInputElement
的用法示例。
在下文中一共展示了HTMLInputElement::click方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: callAsFunction
JSValue* JSHTMLInputElementPrototypeFunction::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)
{
if (!thisObj->inherits(&JSHTMLInputElement::info))
return throwError(exec, TypeError);
HTMLInputElement* imp = static_cast<HTMLInputElement*>(static_cast<JSHTMLInputElement*>(thisObj)->impl());
switch (id) {
case JSHTMLInputElement::BlurFuncNum: {
imp->blur();
return jsUndefined();
}
case JSHTMLInputElement::FocusFuncNum: {
imp->focus();
return jsUndefined();
}
case JSHTMLInputElement::SelectFuncNum: {
imp->select();
return jsUndefined();
}
case JSHTMLInputElement::ClickFuncNum: {
imp->click();
return jsUndefined();
}
}
return 0;
}
示例2: jsHTMLInputElementPrototypeFunctionClick
JSValue JSC_HOST_CALL jsHTMLInputElementPrototypeFunctionClick(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
UNUSED_PARAM(args);
if (!thisValue.inherits(&JSHTMLInputElement::s_info))
return throwError(exec, TypeError);
JSHTMLInputElement* castedThisObj = static_cast<JSHTMLInputElement*>(asObject(thisValue));
HTMLInputElement* imp = static_cast<HTMLInputElement*>(castedThisObj->impl());
imp->click();
return jsUndefined();
}
示例3: submitClick
void HTMLFormElement::submitClick()
{
bool submitFound = false;
for (unsigned i = 0; i < formElements.size(); ++i) {
if (formElements[i]->hasLocalName(inputTag)) {
HTMLInputElement *element = static_cast<HTMLInputElement *>(formElements[i]);
if (element->isSuccessfulSubmitButton() && element->renderer()) {
submitFound = true;
element->click(false);
break;
}
}
}
if (!submitFound) // submit the form without a submit or image input
prepareSubmit();
}