<html>
<title>
How to find the browser name using JavaScript?
</title>
<script>
function find_browser()
{
var nAgt = navigator.userAgent;
if (nAgt.indexOf('Chrome') != -1) {
alert('Chrome');
}else if (nAgt.indexOf('Firefox') != -1) {
alert('Firefox');
}else if (nAgt.indexOf('Opera') != -1) {
alert('Opera');
}else if (nAgt.indexOf('MSIE') != -1) {
alert('Microsoft Internet Explorer');
}else if (nAgt.indexOf('Safari') != -1) {
alert('Safari');
}else if (nAgt.indexOf('Trident/') != -1) {
alert('Microsoft Internet Explorer (MSIE 11+)');
}else{
alert('Others');
}
}
</script>
<body onload="find_browser()">
<h1> Find the browser name using JavaScript? </h1>
</body>
</html>
Error: PG::DuplicateTable: ERROR: relation "taggings" already exists Solution : Already the table present in your database.But migration also trying to create a table in database.For this reason error occurred. So try to remove the table (taggings) from your database. postgresql : > DROP TABLE IF EXISTS taggings; Rails console : > ActiveRecord::Migration.drop_table(:taggings)
Comments
Post a Comment