ソースを参照

Update README.md

Robin Herbots 14 年 前
コミット
d39a8028c9
1 ファイル変更8 行追加9 行削除
  1. 8 9
      README.md

+ 8 - 9
README.md

@@ -127,27 +127,26 @@ $(document).ready(function(){
 
 
 ### set a value and apply mask
 ### set a value and apply mask
 
 
-```javascript
-$(document).ready(function(){
-   $("#number").inputmask('setvalue', 12345); 
-});
-```
-
-when the option patch_eval is set to true the same can be done with the traditionnal jquery.val function
+this can be done with the traditionnal jquery.val function (all browsers) or javascript value property for browsers which implement lookupGetter
 
 
 ```javascript
 ```javascript
 $(document).ready(function(){
 $(document).ready(function(){
    $("#number").val(12345); 
    $("#number").val(12345); 
+   
+   var number = document.getElementById("number");
+   number.value = 12345;
 });
 });
 ```
 ```
 
 
-with the autoUnmaskoption you can change the return of $.fn.val  to unmaskedvalue or the maskedvalue
+with the autoUnmaskoption you can change the return of $.fn.val (or value property)  to unmaskedvalue or the maskedvalue
 
 
 ```javascript
 ```javascript
 $(document).ready(function(){
 $(document).ready(function(){
    	$('#<%= tbDate.ClientID%>').inputmask({ "mask": "d/m/y", 'autoUnmask' : true});	//  value: 23/03/1973
    	$('#<%= tbDate.ClientID%>').inputmask({ "mask": "d/m/y", 'autoUnmask' : true});	//  value: 23/03/1973
-
 	alert($('#<%= tbDate.ClientID%>').val());	// shows 23031973     (autoUnmask: true)
 	alert($('#<%= tbDate.ClientID%>').val());	// shows 23031973     (autoUnmask: true)
+	
+	var tbDate = document.getElementById("<%= tbDate.ClientID%>");
+    alert(tbDate.value);	// shows 23031973     (autoUnmask: true)
 });
 });
 ```
 ```