JS中的location.host可以返回当前网址的主机名
<!DOCTYPE html> <html> <body> <script> document.write(location.host); </script> </body> </html>
JS中的location.host可以返回当前网址的主机名
<!DOCTYPE html> <html> <body> <script> document.write(location.host); </script> </body> </html>