大约有 18,000 项符合查询结果(耗时:0.0158秒) [XML]
Javascript callback when IFRAME is finished loading?
...
I noticed you created the DOM element with pure javascript and then passed that variable to jQuery as the selector, maybe that is why you code isn't working?
– Neo
May 3 '13 at 16:16
...
Input type=password, don't let browser remember the password
... password. But I'm drawing a blank. Is there an HTML attribute or some JavaScript trick that will do this?
14 Answers
...
Image resizing client-side with JavaScript before upload to the server
I am looking for a way to resize an image client-side with JavaScript (really resize, not just change width and height).
I know it's possible to do it in Flash but I would like to avoid it if possible.
...
How to set a value to a file input in HTML?
...;
<input type="file" value="c:/passwords.txt">
</form>
<script>document.foo.submit();</script>
You don't want the websites you visit to be able to do this, do you? =)
share
|
...
How to make an AJAX call without jQuery?
How to make an AJAX call using JavaScript, without using jQuery?
23 Answers
23
...
jQuery .ready in a dynamically inserted iframe
...omeone clicks on a picture. In this iframe, we are using galleria a javascript library to display multiple pictures.
10 ...
How can I listen to the form submit event in javascript?
...t;input type="submit" name="submit">
</form>
JavaScript
window.onload = function() {
var form = document.querySelector("form");
form.onsubmit = submitted.bind(form);
}
function submitted(event) {
event.preventDefault();
}
...
img tag displays wrong orientation
...pic03.jpg" width="200" alt="Cat 1" id="campic" class="camview">
<script type="text/javascript" src="exif.js"></script>
<script type="text/javascript" src="rotate.js"></script>
</body>
</html>
rotate.js:
window.onload=getExif;
var newimg = documen...
How to decode HTML entities using jQuery?
...ecause older versions of jQuery would deliberately and explicitly evaluate scripts contained in the string passed to .html(). Hence code like this shows an alert in jQuery 1.8:
//<!-- CDATA
// Shows alert
$("<textarea>")
.html("<script>alert(1337);</script>")
.text();
...
Resize HTML5 canvas to fit window
...
I believe I have found an elegant solution to this:
JavaScript
/* important! for alignment, you should make things
* relative to the canvas' current width/height.
*/
function draw() {
var ctx = (a canvas context);
ctx.canvas.width = window.innerWidth;
ctx.canvas.height =...
