c# winform webview2 How focus getelementbyid?

Viewed 425

Actually want focus & filled. It's very easy filled there no issue but I am don't understand how focus this. Please see this html details

<input type="email" name="loginfmt" id="i0116" maxlength="113" class="form-control ltr_override input ext-input text-box ext-text-box" aria-required="true" data-bind="
                attr: { lang: svr.at ? null : 'en' },
                externalCss: {
                    'input': true,
                    'text-box': true,
                    'has-error': usernameTextbox.error },
                ariaLabel: tenantBranding.unsafe_userIdLabel || str['CT_PWD_STR_Username_AriaLabel'],
                ariaDescribedBy: 'loginHeader' + (pageDescription &amp;&amp; !svr.Cj ? ' loginDescription usernameError' : ' usernameError'),
                textInput: usernameTextbox.value,
                hasFocusEx: usernameTextbox.focused,
                placeholder: $placeholderText" aria-label="Enter your email, phone, or Skype." aria-describedby="loginHeader usernameError" placeholder="Email, phone, or Skype">

Please see below I am using filled code so without any issue I am filled this but How I am focus this don't understand.

webView21.ExecuteScriptAsync("document.getElementById('i0116').value=" + '\'' + HEmail.Text + '\'');

'''

can you see & give me way how I am focus this id?

0 Answers
Related