大约有 15,000 项符合查询结果(耗时:0.0395秒) [XML]
Calling a parent window function from an iframe
I want to call a parent window JavaScript function from an iframe.
10 Answers
10
...
How do I check whether a checkbox is checked in jQuery?
...ted').click(function() {
$("#txtAge").toggle(this.checked);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="checkbox" id="isAgeSelected"/>
<div id="txtAge" style="display:none">Age is something</div>
...
Is there a cross-browser onload event when clicking the back button?
For all major browsers (except IE), the JavaScript onload event doesn’t fire when the page loads as a result of a back button operation — it only fires when the page is first loaded.
...
getting the X/Y coordinates of a mouse click on an image with jQuery [duplicate]
...
Here is a better script:
$('#mainimage').click(function(e)
{
var offset_t = $(this).offset().top - $(window).scrollTop();
var offset_l = $(this).offset().left - $(window).scrollLeft();
var left = Math.round( (e.clientX - offs...
Pass a PHP string to a JavaScript variable (and escape newlines) [duplicate]
What is the easiest way to encode a PHP string for output to a JavaScript variable?
14 Answers
...
How do I enumerate the properties of a JavaScript object? [duplicate]
How do I enumerate the properties of a JavaScript object?
14 Answers
14
...
Convert an ISO date to the date format yyyy-mm-dd in JavaScript
...s will handle date formatting for you. Here is how to include it via a JavaScript tag, and then an example of how to use Moment.js to format a date.
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.14.1/moment.min.js"></script>
moment("2013-03-10T02:00:00Z").format("YYYY...
Strip HTML from strings in Python
... One can still trick this method with something like this: <script<script>>alert("Hi!")<</script>/script>
– user822159
May 23 '13 at 21:13
20
...
JS: iterating over result of getElementsByClassName using Array.forEach
...html>
<head>
<meta charset="UTF-8">
<script>
function findTheOddOnes()
{
var theOddOnes = document.getElementsByClassName("odd");
for(var i=0; i<theOddOnes.length; i++)
{
...
Google Maps: how to get country, state/province/region, city given a lat/long value?
...l; charset=UTF-8"/>
<title>Reverse Geocoding</title>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
var geocoder;
if (navigator.geolocation) {
navigator.geolocation.getC...
