/* write a AI assistant for search medical information in internet */ var search = document.createElement('div'); search.innerHTML = '<input type="text" id="search" placeholder="Search...">'; document.body.appendChild(search); var search_button = document.createElement('div'); search_button.innerHTML = '<button id="search_button">Search</button>'; document.body.appendChild(search_button); var search_result = document.createElement('div'); search_result.innerHTML = '<div id="search_result"></div>'; document.body.appendChild(search_result); var search_button = document.getElementById('search_button'); search_button.onclick = function() { var search_text = document.getElementById('search').value; var search_result = document.getElementById('search_result'); search_result.innerHTML = '<p>' + search_text + '</p>'; };
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter