Javascript - User input through HTML input tag to set a Javascript variable?

前端 未结 4 1019
不思量自难忘°
不思量自难忘° 2021-02-03 14:11

I want there to be a textbox on my screen(like the one i\'m typing in now) that you can type in then click a submit button and it sends whatever you typed in the box to javascri

4条回答
  •  暖寄归人
    2021-02-03 14:29

    I tried to send/add input tag's values into JavaScript variable which worked well for me, here is the code:

    
    
        
            
        
        
            
    
            
         
    
    

提交回复
热议问题