Why do I get an error in IE for this line of code:
I used some stuff that works on the iPad but I was getting an error for the开发者_如何转开发 onFocus stuff before I even added it... here is the script that runs on focus:
function enterValue () { document.form1.itemQuantity.value = ""; }any idea's anyone???
input type="<% =sType %>" class="inputbox" name="itemQuantity" min="1" max="99" step="1" value="<%=varMinQuantity%>" maxlength="2" size="2" onfocus="enterValue()" onclick="this.Focus();this.Select();"
You are doing too many things. onClick WILL focus all by itself, no need to focus and this.select is lowercase
<input type="<% =sType %>" class="inputbox" name="itemQuantity" min="1" max="99" step="1" value="<%=varMinQuantity%>" maxlength="2" size="2" onfocus="this.value=''" >
OR BETTER:
<input type="<% =sType %>" class="inputbox" name="itemQuantity" min="1" max="99" step="1" value="<%=varMinQuantity%>" maxlength="2" size="2" onfocus="this.select()" >
精彩评论