jQuery 제거 속성

jQuery 속성 삭제

$().removeAttr(속성 이름) //속성 삭제

<!DOCTYPE html>
<html>
    <head>
        <title>php.cn</title>
        <meta charset="utf-8" />
        <script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
        <script>
            function get(){
                $("#in").removeAttr('value');
            }
        </script>
    </head>
    <body>
        <input type="text" value="你好" id="in"/>
        <input type="button" value="删除属性" onclick="get()">
    </body>
</html>


지속적인 학습
||
<!DOCTYPE html> <html> <head> <title>php.cn</title> <meta charset="utf-8" /> <script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script> <script> function get(){ $("#in").removeAttr('value'); } </script> </head> <body> <input type="text" value="你好" id="in"/> <input type="button" value="删除属性" onclick="get()"> </body> </html>
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!