示例#1
0
文件: Html5App.cs 项目: Dim0N22/Demos
        public static void Main()
        {
            Document.Body.Style.Padding = "20px";

            var form = new FormElement
            {
                ClassName = "col-md-6"
            };

            var panel = Html5App.CreatePanel();

            form.AppendChild(panel);

            Document.Body.AppendChild(form);

            UpdateButton_Click(null);
        }
示例#2
0
文件: Form.cs 项目: dzeitlin/WootzJs
        protected override Element CreateNode()
        {
            form = Browser.Document.CreateElement <FormElement>("form");
            form.AddEventListener("submit", OnSubmitting);

            // This is necessary for enter-on-submit to work since it requires
            // the presence of a submit button in the form.
            var hiddenSubmit = Browser.Document.CreateElement("input");

            hiddenSubmit.Style.Position = "absolute";
            hiddenSubmit.Style.Height   = "0px";
            hiddenSubmit.Style.Width    = "0px";
            hiddenSubmit.Style.Border   = "none";
            hiddenSubmit.Style.Padding  = "0px";
            hiddenSubmit.SetAttribute("type", "submit");
            hiddenSubmit.SetAttribute("hidefocus", "true");
            hiddenSubmit.SetAttribute("tabindex", "-1");
            form.AppendChild(hiddenSubmit);

            return(form);
        }
示例#3
0
        public static void Main()
        {
            Document.Body.Style.Padding = "20px";

            var form = new FormElement
            {
                ClassName = "col-md-6"
            };

            var panel = Html5App.CreatePanel();
            form.AppendChild(panel);

            Document.Body.AppendChild(form);

            UpdateButton_Click(null);
        }