OGeek|极客世界-中国程序员成长平台

标题: javascript - 按 CSS Styled 按钮会出现不需要的键盘 UIWebView [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 18:05
标题: javascript - 按 CSS Styled 按钮会出现不需要的键盘 UIWebView

我在 UIWebView 中加载了一个本地 html 资源。一个按钮使用 CSS 设置样式,按下时会显示不需要的键盘并允许在按钮上输入

在我的本地 html 文件中

 <style>
    .button {
        border: 0px solid #ed1717;
        background: #e01414;
        background: -webkit-gradient(linear, left top, left bottom, from(#e01414), to(#e01414));
        background: -webkit-linear-gradient(top, #e01414, #e01414);
        background: -moz-linear-gradient(top, #e01414, #e01414);
        background: -ms-linear-gradient(top, #e01414, #e01414);
        background: -o-linear-gradient(top, #e01414, #e01414);
        background-image: -ms-linear-gradient(top, #e01414 0%, #e01414 100%);
        padding: 14px 28px;
        -webkit-border-radius: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
        -webkit-box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
        -moz-box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;
        box-shadow: rgba(255,255,255,0.4) 0 0px 0, inset rgba(255,255,255,0.4) 0 0px 0;

        color: #ffffff;
        font-size: 17px;
        font-family: helvetica, serif;
        text-decoration: none;
        vertical-align: middle;
    }
</style>

html按钮本地资源

        align=center ><INPUT onclick=calculate(this.form) class=button value="ress" name=calculate_button>



Best Answer-推荐答案


尝试将 type="button" 属性设置为输入元素。这应该可以解决问题

关于javascript - 按 CSS Styled 按钮会出现不需要的键盘 UIWebView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21202903/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4