I'm coming in from this post: Input max equal to javascript variable but it did not quite solve my issue. I'm currently working with Google's HTML Service and I need help with the case below...
If I have a Code.gs
function like this: var myVar = function() { var x=2; return (x+x); }
... and then, inside my HTML file, I have an input tag written like this: <input id... max=myVar>
Would setting the max
attribute like this: .setAttribute("max", myVar)
successfully change that value based on the value returned from my custom function? Initial attempts are failing.