JavaScript:
Ques 1. The first code does not work with Safari. Why?Ques 2. What is the difference between these codes.
Thank,
href
See also: http://www.w3.org/TR/Window/#location
location.href("somefile.php");... location.href = "somefile.php"; "" , .
location.href("somefile.php");
location.href = "somefile.php";
It is also more efficient using window.location than location. So try using:
window.location.href = "somefile.php";
(as Andy said, href is a property, and in JS you define the value of a property this way: object.property = "value")
Answer 1: - This will not work because href is a property of a location object, not a method.Answer 2: - location.href ("...") denotes a method (which is invalid), and location.href is a property.
Source: https://habr.com/ru/post/1748661/More articles:js objects and properties - javascriptEfficient way to access identifier matching in Python - pythonIs one instance of an IDE for all development platforms? - eclipsehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1748659/htaccess-redirect-https-to-http-not-working&usg=ALkJrhiCR9gEJJB0LIdTJveGHdQgXswTUAHow to apply Seq display function? - f #Writing a forum cleaning program - pythonTransparent layout qt - qtUIImagePickerController with my images - objective-cHow to get response headers from a WebBrowser control in .NET? - browserSQL join from multiple tables - tsqlAll Articles