How to get selected the item in dropdown and dropdown is part of custom node property

.html file code to add dropdown in custom node property

<div class="form-row">
		 <label for="node-input-userValue"><i class="fa fa-calculator"></i> Value</label>
     <select id="node-input-userValue">
	 <option>1</option>
	 <option>2</option>
     </select>
	 </div>

and i am trying to access it in .js file of same custom node like

    var node = this;
    node.on('input', function(msg) {
    var selected_item= node.userValue;			
    outMsg = {payload: node.userValue}
    node.send(outMsg);
    });

Have you added userValue into the defaults section in .html?

RED.nodes.registerType('mynode',{
        category: 'function',
        color: '#a6bbcf',
        defaults: {
            userValue: {value:""}
        },

then in your .js ...

node.userValue = config.userValue || "none";

See here for reference : https://nodered.org/docs/creating-nodes/first-node

Thanks it works for me thank you so much