forked from xamarin/ios-samples
-
Notifications
You must be signed in to change notification settings - Fork 5
/
test.html
32 lines (25 loc) · 947 Bytes
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<html>
<head>
<title>NSUrlProtocol Example</title>
</head>
<body>
<img src="custom:///NSUrlProtocol%20Example">
<!-- we have implemented a special NSURLProtocol that uses the 'special'
scheme to identify urls it is capable of handling. Our protocol simply
renders the path part of the URL into a jpeg image. We use this scheme
here to produce images in the html. -->
<form action="" method="get" onSubmit="return false;">
<p>Type your text here:<br>
<input name="exampletext" id="stringtext" type="text" size="21" onKeyUp="NewText();" value="Example Text"></p>
<img src="custom:///Example%20Text" id="stringimage">
</form>
<script type="text/javascript" language="javascript">
function NewText() {
var textField = document.getElementById('stringtext');
var image = document.getElementById('stringimage');
var theNewURL = 'custom:///' + escape(textField.value);
image.src = theNewURL;
}
</script>
</body>
</html>