Jump to content

Changing HTML element using variable


slj90

Recommended Posts

Usually it would be something like:

 $("#lblpasswordmessage").html("Password is too short"); 

But how do you do it using a variable? For example say the variable is called 'pwm';

 $("#pwm").html("Password is too short"); 
 $("pwm").html("Password is too short"); 
 $(pwm).html("Password is too short"); 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/293018-changing-html-element-using-variable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.