Edit in JSFiddle

var layers = [
  new ol.layer.Tile({
    source: new ol.source.OSM()
  }),
  new ol.layer.Tile({
    source: new ol.source.TileWMS({
      url: 'http://wms3.nve.no/map/services/Nedborfelt1/MapServer/WmsServer?',
      params: {
        'LAYERS': 'Vassdragsomrade'
      },
      attributions: "NVE"
    })
  })
];
var map = new ol.Map({
  layers: layers,
  target: 'map',
  view: new ol.View({
    center: [1402455, 9381155],
    zoom: 5
  })
});
<div id="map" class="map"></div>

              

External resources loaded into this fiddle: