In the form (or custom control) loaded event, focus () is set for an internal editable control,ProgramAfter running, the control should be focused.
There is no problem in testing in IE, but it fails in chrome. After looking at some examples, I found that there are two ways to solve the problem:
1. Add the following content to a proper location (such as the loaded event ):CodeHtmlpage. plugin. Focus (); 2. Add JavaScript code control in the file carrying the SL plug-in to get the focus;
Write a JavaScript method for calling
FunctionAppload (sender, argS ){
VaRXamlobject = Document. getelementbyid ('silverlightcontrol ');
If(Xamlobject! =Null)
Xamlobject. Focus ();
}
Add the ID attribute id = "silverlightcontrol" to the object node"
Add Param <Param name = "onLoad" value = "appload"/>
Certificate ----------------------------------------------------------------------------------------------------------------------------------------------
In fact, the principles of the two methods are the same, except that the former is processed on the server and the latter is processed on the frontend. Unfortunately, neither of the two methods has been successfully tested. Sometimes I will continue the test and record the test results.
(When It Comes To browser compatibility, it's a big deal. You can see it again !)