05-將input 變成div

05-將input 變成div

https://js.do/powenko/352363
[php]
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
First name: <input type="text" value="first " name="fname" />
Last name: <input type="text" value="Last " name="lname" />

<button>轉換</button>

<script>
$("button").click(function(){
$("p").slideToggle();

$(‘ input’).replaceWith(function(){
//console.log(‘type: ‘ + t_type+ ‘ name: ‘ + input.attr(‘name’) + ‘ id: ‘ + input.attr(‘id’) + ‘ Value: ‘ + t_val);
return ‘<span id=’+this.id+’ class=’+this.className+’>’+this.value+'</span>’
})
});
</script>

[/php]

Jquery
CH01 找物件CH02 設定取得值CH10 AJAXCH101 INPUT-Autocomplete