Result
jQuery
$(document).ready( function () { //キーボードイベント $( "#input" ).keyup( function () { //id="input"に入力した内容がid="out"に反映される $( "#out" ).html($( this ).val()); }); //クリックイベント $( "#show" ).click( function () { //反映箇所の表示/非表示スイッチ $( "#out" ).toggle(); return false ; }); }); |
css
/*非表示にしておく*/ #out{ display : none ; padding : 1px ; border : 1px solid #666 ; width : 152px ;} |
html
< input type = "password" id = "input" > < a id = "show" >show</ a > < p id = "out" ></ p > |
Warning: include(/home/youhei0828/kachibito.net/public_html/wp-content/themes/cocoon-master/my-php/jquery-other-snippets.php): Failed to open stream: No such file or directory in /home/youhei0828/kachibito.net/public_html/wp-content/themes/kachibito7_with_cocoon_child/functions-module/shortcode/add-post-myphp.php on line 7
Warning: include(): Failed opening '/home/youhei0828/kachibito.net/public_html/wp-content/themes/cocoon-master/my-php/jquery-other-snippets.php' for inclusion (include_path='.:/opt/php-8.1.29/data/pear') in /home/youhei0828/kachibito.net/public_html/wp-content/themes/kachibito7_with_cocoon_child/functions-module/shortcode/add-post-myphp.php on line 7